-
Notifications
You must be signed in to change notification settings - Fork 518
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
Specifying macros in test profile in umbrella app does not seem to have an effect #1566
Comments
I had not seen this issue previously, sorry about that. I was just able to reproduce the issue and am investigating. |
I believe the problem is that the test profile auto-inserts an |
So I think the problem here is that rebar3 automatically inserts a value However, when in an umbrella setting under the test profile, the initial At some point later, the list is transformed to a dict, and one of the I think the same underlying behaviour causes problems in the following issues as well as this one:
@tsloughter how do you feel about us finding a way to make the application of merge_opts rule work fine recursively within each profile? I don't know if it would fix things, but I think it would. See: Lines 119 to 120 in d906476
The problem being that when the function is applied recursively, it is applied to each profile (so it will merge on the keys I'm afraid this might be some form of breaking change though. Not 100% sure about it. |
Potential fix at #1606 |
Thanks for taking a look at this and I'm happy to report that your PR seems to fix my issue. I'll test this rebar3 version against VerneMQ and some other projects to see if I can detect any adverse effects. |
Maybe related to #1477 ?
Environment
Current behaviour
I have an umbrella app and I would like to define a macro with different values
for different profiles, and in particular I'd like to define a specific value
when using the test profile.
I therefore created an umbrella project looking like this:
I pushed the repo here: https://github.com/larshesel/umbr
with the top-level
rebar.config
file looking like this:{deps, []}.
And the
app1
rebar.config file looking like this:And in the
apps/app1/src/app1_app.erl
I reference the macro.I would then expect that I could then run
rebar3 as test compile
and the macrowould be correctly be defined, but the profile doesn't seem to be include or is ignored:
On the other hand compiling as the
sth
profile works:Which makes me wonder why one profile works and another not?
Expected behaviour
I expected the
MYMACRO
to be defined when runningrebar3 as test compile
and the compilation to work.I was wondering if I might need to try and override the
test
profile in the umbrella app and tried to do so without getting that to work either. Maybe I was just not doing that correctly? Should it work without overriding or not?The text was updated successfully, but these errors were encountered: