-
Notifications
You must be signed in to change notification settings - Fork 521
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
sort-as: force an order on multiple profiles #1716
Conversation
This shouldn't be done. The order of applied order between a+b and b+a is not the same and that was a deliberate choice, since the semantics should be different. I don't think that it's a good idea to start replacing these. If people currently have profile like |
Hm I think I saw both forms appear given only one What do you think about symlinking plugins? |
Symlinking plugins could work as long as the plugin versions don't change across profiles, but we haven't been able to properly track plugin versions since they are downloaded and compiled as part of the build process itself. |
So I can replicate the issue:
My actual command looks like |
Yeah I think the test breakage is due to no longer respecting the profile order defined by tests there. I could not reproduce the issue on the rebar3 build itself, and I thought the issue could be related to the Can you reproduce the issue with any other command than proper? I'm a bit dumbfounded as to what could cause it, but it does appear related. |
On latest master 2560aaf: $ ./bootstrap && ./rebar3 as test,bla cover
...
$ ls _build
bla+test bootstrap default To better show the issue I have added the test Note, with this PR: $ ./bootstrap && ./rebar3 as test,bla cover && ls _build
bootstrap default test+bla |
Okay, I think the issue is rather related to something about the handling of default profiles on some providers. The issue is not the reversing in deduplication alone, it's the deduplication when matched with the default profile of an issue being repeated explicitly in the list of The current patch still fails builds in all versions because it breaks the ordering of profiles in some of the other cases. I think it's just a partial fix. |
Hm i see. I think reverting this and just appending the test profile if it’s not there yet would solve my issue. |
If you want a better commit message I’ll set it and squash everything. |
I think a final way to fix this would be to only add the profiles in the ‘profiles’ key of the providers “module” call that are not current profiles yet. I’ll gladly look into this however I’m not sure providers is even a real module or if it’s built at runtime I have issues finding where. |
Providers library is implemented at https://github.com/tsloughter/providers |
Last commit is the best I could come up with :) |
If you like this I can squash and we'd be done with this PR :) |
Seems to make sense, sorry for the delay. |
Ah you should have warned me I'd have squashed |
Ensures that directories inside _build/ have a fixed nomenclature: makes it impossible for
rebar3 as a,b
to create sometimes_build/a+b
and other times_build/b+a
.I got caught by it when developing offline. Plugins were pulled to a+b but then rebar3 would decide to use
b+a
and would fail to load plugins.Next step would be to symlink plugins instead of re-fetching them when using a new
as
combination. That would probably be an issue provided that plugins are (generally?) un-version'ed.