xod
xod copied to clipboard
As an IDE admin I want to not load some standard libs so that xoders of mine have the same focused environment
In some environments standard libraries like “advanced” xod/i2c or hobby-grade xod-dev/hc-sr04-ultrasonic make a little sense. For a straightforward xoding experience, only the bare minimum of necessary libraries should be enabled by an admin in this case. Let’s introduce features to mark some standard libraries as not desirable to be loaded.
Currently, the list of libraries to load is auto-detected in the following way:
- For the desktop IDE: contents of the user-workspace and bundled workspace directories
- For the browser IDE: bundled project contents (or a static predefined list after #2017 implementation)
An additional layer above the list obtained by auto-detect is required to exclude some libraries which would otherwise be loaded.
Auto-detected config.json XOD IDE
list of -> Exclusion -> Project
libraries filter Browser
User story
I edit my custom config.json and list things not to load explicitly:
{
"libraries": {
"unloadIfUnused": [
"xod/waves",
"xod-dev/*",
"xod-cloud/*"
],
"load": [
"xod-dev/servo",
]
}
}
The config above should exclude xod/waves and any libraries that belong to xod-cloud and xod-dev except the xod-dev/servo from loading at startup.
The wildcard * is only valid in libraries.unloadIfUnused and works the same way it does in Bash. An entry equal to just * is perfectly legal and means “exclude everything but the things listed in load”.
The filtering applies only at the moment of IDE load. If I manually install the xod/waves library then, it will appear in the project browser as usual, until IDE restart. Similarly, if I open a project which uses an unloaded library (directly or transitively), that library will be loaded (open from local storage) and will be available until IDE restart.
Acceptance criteria
- [ ] The
libraries.unloadIfUnusedsection ofconfig.jsonworks as described above - [ ] The
loadlist acts as a mask aboveunloadIfUnused. That is, if I unloadxod-dev/*(which impliesxod-dev/[email protected]) and loadxod-dev/servo, this will leave the requirement forxod-dev/[email protected]and not the latest version.
The filtering applies only at the moment of IDE load. If I manually install the xod/waves library then, it will appear in the project browser as usual, until IDE restart. Similarly, if I open a project which uses an unloaded library (directly or transitively), that library will be loaded/installed and will be available until IDE restart. ...
- [ ] The load list acts as a mask above unloadIfUnused. That is, if I unload xod-dev/* (which implies xod-dev/[email protected]) and load xod-dev/servo, this will leave the requirement for xod-dev/[email protected] and not the latest version.
I want to make it clear. In such cases (manual installing via "Add Library" / opening project with the unloaded library) should IDE load it from the cloud or try to extract it from a bundled libraries first?