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

Proposal: prefer local installs for implicit depedencies #1044

Open
jhheider opened this issue Oct 14, 2024 · 4 comments
Open

Proposal: prefer local installs for implicit depedencies #1044

jhheider opened this issue Oct 14, 2024 · 4 comments
Labels
suggestion a suggestion we would like to implement at some point

Comments

@jhheider
Copy link
Contributor

Currently, pkgx uses this loop to bring in dependencies automatically to a dev environment, based on contents. This can cause some surprising behaviors like #1041 .

It would probably be better to bring in dependencies only when missing. This could potentially be generalized into a async function load_implicit_deps(binname: string, dep: PackageRequirement). This would add some load time to a dev env, unfortunately, but it means not loading our git in if it is already present on the path.

Since dependencies can always be explicit in the YAML file, this should be a less surprising at the cost of checking the path on load, and result in fewer instances where a user needs to forcibly "unload" a pkgx package from their environment due to conflicts.

@jhheider jhheider added the suggestion a suggestion we would like to implement at some point label Oct 14, 2024
@mxcl
Copy link
Member

mxcl commented Oct 16, 2024

I have thought this was right many times.

@mxcl
Copy link
Member

mxcl commented Oct 16, 2024

I guess the issue is “magic” where you don’t know what will happen because you don’t know what pkgx will decide particularly.

@aberres
Copy link

aberres commented Oct 29, 2024

I would also be interested in "partial" dev environments. We have git around, python is managed by virtual environments managed with uv, and node might be handled with volta.

I would be happy to explicitly exclude some integrations to avoid "magic".

Or the way around: Something like dev +pnpm +curl +yy - the same as env but using the logic dev uses to resolve versions.

@aberres
Copy link

aberres commented Oct 29, 2024

Or maybe an opt-out with something like dev -python.org -git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion a suggestion we would like to implement at some point
Projects
None yet
Development

No branches or pull requests

3 participants