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

installed jbang script picks up local jbang.properties #1735

Open
maxandersen opened this issue Jan 21, 2024 · 3 comments
Open

installed jbang script picks up local jbang.properties #1735

maxandersen opened this issue Jan 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@maxandersen
Copy link
Collaborator

I was playing with pulumi using jbang.properties to hold dependencies. All good fun.

but then I ran mima list something and that mima run picked up jbang.properties preventing me from running mima as dependency conflicts.

This is somewhat expected but I'm wondering if we should have a run mode for "installed" apps to NOT pick up local jbang.properties so they don't get "disturbed".

@maxandersen maxandersen added the bug Something isn't working label Jan 21, 2024
@quintesse
Copy link
Contributor

Hmm indeed.... I wonder if instead of having some kind of "exception" for installed apps we have to rethink how those property files are resolved instead?

Anyway, can you explain a bit more in detail what you were doing? How were you putting dependencies in jbang.properties?

@maxandersen
Copy link
Collaborator Author

jbang config add deps gav,gav2

...one way would be to say here I should just use a jbang.build instead?

@quintesse
Copy link
Contributor

quintesse commented Jan 22, 2024

jbang config add deps gav,gav2

That's definitely something I would advise against.
It's only possible because we have some very generic code that makes all CLI flags settable by config items... but this is definitely one example where I think that might not have been the best idea :-)

...one way would be to say here I should just use a jbang.build instead?

Yeah

One possible solution I was thinking of is that right now resolving catalogs and properties uses the exact same algorithm, but separately, so the catalog might be found in a very different place from the properties. Perhaps that's something to revisit? I could imagine for example that we only apply the properties found in the same spot as the catalog. Or perhaps only in properties in the same spot and "higher" up, not lower down. (So the properties in the local folder would not affect aliases found in higher directories or in your user folder). But I haven't thought this idea through yet (for one it might be very hard to implement, dunno yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants