-
Notifications
You must be signed in to change notification settings - Fork 14
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
add JULIA_CONDAPKG_ENV
for centralized environment
#53
Conversation
JULIA_CONDAPKG_ENV
JULIA_CONDAPKG_ENV
for centralized environment
Looks good so far, thanks! On my phone right now so can't review properly but the environment written to needs to be included in the metadata, and the skip resolve check should check if the environment has changed. |
Codecov Report
@@ Coverage Diff @@
## main #53 +/- ##
==========================================
- Coverage 87.66% 87.60% -0.06%
==========================================
Files 7 7
Lines 900 912 +12
==========================================
+ Hits 789 799 +10
- Misses 111 113 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thanks,
Does that imply adding a |
@cjdoris, can you remove the workflows approval please ? |
408b3e0
to
0278a63
Compare
Yes that's right. There should be a special value (the empty string?) for the default project location, in case the user moves the project. I'll take a closer look at this in the new year, thank you. |
Uh how? I only get a button to run the workflows (which I've just done). |
Thanks, have some nice afk holidays !
Settings (the wheel) -> Actions (left side bar) -> General -> Change "Require approval for first-time contributors" to "Require approval for first-time contributors who are new to Github". |
As you've gathered from Discourse I haven't forgotten about this PR! I'm just struggling to find enough laptop time to take a proper look. Any thoughts on those CI failures? One observation is you need to reset |
Thanks, I've changed that. Can you apply the changes suggested in #53 (comment) ? CI is waiting again for approval: I can't thus move forward on this PR. Let's not waste time. |
Ok I've changed that setting thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks great now, thanks for your effort on this.
One thing that concerns me is that it's possible to end up with a Conda environment that is not consistent with your CondaPkg.toml. For example, in one project I specify somepackage==1.0.0
, which is installed, then in another I specify somepackage==2.0.0
, which is installed, then when I switch back to the first project, CondaPkg does not resolve again, so is still on 2.0.0. This is because the CondaPkg metadata is still stored per-project.
Some solutions to this:
- Just document it as a current drawback of using a shared environment, leaving it up to the user to re-resolve when they change project (or ignore the problem, since dependencies are probably pretty loose anyway).
- Don't allow
resolve()
to bail out early when in a shared environment. This will slow down time-to-first-resolve even when the environment is already OK. - Add a metadata file to the shared Conda environment specifying which Julia projects have installed stuff into it. Then CondaPkg can take dependencies from all of these projects. This could be a fair bit of work to implement.
- Add a metadata file to the shared Conda environment specifying which Julia project was the last to resolve there. Then if you start Julia again in the same project, it can skip resolving. Downside is that it will do a full resolve whenever you swap projects.
The third option I think is the only one which would reliably always have the right dependencies, without any needless resolving.
I'd be happy to leave this as future work and merge this PR as-is, maybe adding a note to the documentation as in option 1.
Yes I first took the approach of writing a metadata file in the shared env (without considering one in a per-julia-version So I think I'll probably document 1., and leave this enhancement for another PR. Also, for my usage, having different specified conda packages versions never came up (kind of orthogonal to having a |
As a side note, the tests are hard to follow in CI, and IMO it would be useful to print the test name to split the |
Hum, I fail to understand why |
I'm pretty sure we hit an incorrect fast path, either https://github.com/cjdoris/CondaPkg.jl/blob/4ecd7a2d16c3da1f95966c5a5570a026023dd700/src/resolve.jl#L383-L386 , causing sporadic / random failures on windows only. |
This is great, thanks for all your work! |
Possible implementation for #52.
Fix #52.
Tests passing locally.