-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
[automation] Ignore relative lib directories for scripts #2408
Conversation
The PR build failure seems to be related, but I am not sure whether this is because it still has some outdated infos for the Karaf features. Wdyt? Is the build working locally for you? |
Build works for me, and I changed nothing related to the build and/or features/osgi. I've re-pushed (with no real changes) to try another build... |
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
...rebased from latest main to try to rerun the build... |
This reverts commit 241a4f6.
Sorry, I had to revert this, since there is indeed still a OSGi service dependency to DependencyTracker, which is no longer an OSGi service. |
@kaikreuzer you're right, apologies for that. What I am trying to do here is the minimum amount of change to allow a more flexible layout for JS scripting. The issue is that currently openHAB prescribes a single file layout arrangement for all scripting languages:
My personal feeling is that we should separate languages entirely (e.g. Anyway, I'm reluctant to introduce such a significant change at this point, which is why I'm making more minor changes. I'll redo this PR to pull dependency tracking out of |
I agree, that would be a cleaner approach.
Maybe we could go there in two steps: First is to additionally support
Great, thanks! |
Yes - this would be a much better approach. I have never liked the deep hierarchy for scripts and libraries, and also wondered why users really need to see the In fact, I believe that @csowada already has a forked implementation that has done something like this. @csowada how far off to what we are discussing here are your changes? I'm thinking that we would:
|
Hello @jpg0 , here is my change commit csowada/openhab2-addons@0b19023 But I think it is not compatible with the latest changes and it is a quick-and-dirty implementation. The main problem was that class But this implementation is working here since several months. |
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
…" (openhab#2414) This reverts commit 241a4f6.
Signed-off-by: Jonathan Gilbert <jpg@trillica.com> GitOrigin-RevId: 241a4f6
…" (openhab#2414) This reverts commit 241a4f6. GitOrigin-RevId: 6a6e201
ScriptFileWatcher can now be configured to ignore specific, relative directories. This is used so that it can ignore "node_modules" which is what JS is hardcoded to use as a library path.
(Note that this also disables generic library tracking, and instead leaves specific enablement up to script engine providers. I will re-enable this in the JS add-on.)
This change is required to allow JS scripts to use relative paths for libraries, to allow general support for 3rd party libraries and tooling.
Signed-off-by: Jonathan Gilbert jpg@trillica.com