Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As an IDE admin I want to not load some standard libs so that xoders of mine have the same focused environment #2018

Open
2 tasks
nkrkv opened this issue Aug 11, 2020 · 1 comment

Comments

@nkrkv
Copy link
Member

nkrkv commented Aug 11, 2020

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:

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.unloadIfUnused section of config.json works as described above
  • The load list acts as a mask above unloadIfUnused. That is, if I unload xod-dev/* (which implies xod-dev/servo@0.33.0) and load xod-dev/servo, this will leave the requirement for xod-dev/servo@0.33.0 and not the latest version.
@brusherru
Copy link
Contributor

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/servo@0.33.0) and load xod-dev/servo, this will leave the requirement for xod-dev/servo@0.33.0 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants