-
Notifications
You must be signed in to change notification settings - Fork 234
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 handling of REBAR_CACHE_DIR env variable #457
Conversation
3d547c3
to
954f19f
Compare
@jadeallenx, I'd like to have #452 approved and merged before I go for #454, then #455, then this one, as I'm sure there'll be conflicts. @x0id, thanks for this. A couple of comments:
|
Yeah this is a great patch, thanks - does need a rebase but I'd hold off until those other two PRs are merged so you don't have to constantly rebase... thank you! ❤️ |
what do you mean by that? I added lines to all variants of activate/deactivate including
What I could suggest - making that variable optional. I'll think about it.
Not sure I'm aware of these details, if you have an example let me know, but I agree with the point.
Is there any part of |
Right you are. The GitHub diff UI is so small I only saw the
I'm Ok as-is, though, as long as State5 = case os:getenv("REBAR_CACHE_DIR") of
false ->
State4;
CachePath ->
rebar_state:set(State4, global_rebar_dir, CachePath)
end, then later... global_cache_dir(Opts) ->
Home = home_dir(),
rebar_opts:get(Opts, global_rebar_dir, filename:join([Home, ".cache", "rebar3"])). which I'd say is the "official" exposed function.
Look in the GitHub actions file, under |
So what's missing now is:
|
Once we get this in I'll do a new release <3 |
The REBAR_CACHE_DIR should be separated between releases to avoid unexpected dialyzer errors caused by cached files from previous "rebar3 dialyzer" runs.
Take into account if REBAR_{PLT,CACHE}_DIR was set If REBAR_CACHE_DIR and REBAR_PLT_DIR were empty, the corresponding _KERL_SAVED_* are also empty, so cleanup does not work leaving garbage like this: _KERL_SAVED_REBAR_CACHED_DIR= REBAR_CACHED_DIR=/Users/user/kerl/25.2/.cache/rebar3 _KERL_SAVED_REBAR_PLT_DIR= REBAR_PLT_DIR=/Users/user/kerl/25.2 The fix adds _KERL_REBAR_{PLT,CACHE}_DIR_SET vars to account that
954f19f
to
60ea625
Compare
I have rebased the PR onto the latest master after adding a couple of cleanup-improving updates. |
I added |
Undoubtedly true - unless it’s zsh or bash it doesn’t get a lot of love.
ok that seems reasonable
that would be very welcome- thanks! |
Looking good. ❤️ 2 minor changes requested, and a code update suggestion added.
Agreed. Would you open an issue for this, referencing your comment, in that case? Thanks. Maybe we can even try do see what an AI would do for "convert this bash to that fish" and then adapt? For tests too, but that's "for the future". Tests are failing and so is the Lint action. I can help with the lint, if you want, by doing it locally and proposing changes. For the tests, there's very little information, so I'm actually not sure what's breaking: maybe in case of error we could also output the diff? |
I have fixed lint errors, activate-test integration in CI, and corrected activate/deactivate code slightly. |
Looks good to me. I'll wait for @jadeallenx. @x0id, is the stuff you plan to do identified in the Issues? Or not interesting to have there (e.g. for pre-discussion before a pull request)? |
Let's ship it :) Thanks! |
Tried to briefly describe in #458. |
Perfect, stuff, thanks much. |
The REBAR_CACHE_DIR should be separated between releases to avoid unexpected dialyzer errors caused by cached files from previous "rebar3 dialyzer" runs.
By default rebar3 uses ~/.cache/rebar3, this caused problems in different kerl environments.
Description
Handling of the REBAR_CACHE_DIR variable was added the same way as it was done for REBAR_PLT_DIR.
Closes #<issue>.