Giter Club home page Giter Club logo

Comments (5)

ferd avatar ferd commented on May 15, 2024

I'd expect update_profile to crush the config entirely for erl_opts. I'm guessing a general get/set mechanism could be okay.

from rebar3.

tsloughter avatar tsloughter commented on May 15, 2024

The current way profiles work are that key's that have list values have those lists merged. So this is in keeping with how profile merging works.

from rebar3.

talentdeficit avatar talentdeficit commented on May 15, 2024

i don't think i really understand the life cycle of a command. the problem with the eunit handler in particular is that it's got a declared dependency on compile which means compile runs before eunit and the TEST macro is never defined for source files in src. that means no inline tests are run

i think the intention is that running eunit under the test profile would cause it's dependencies (compile) to also run under the test profile but that still means you need an {eunit_compile_opts, [...]} or {erlopts, [...]} tuple declared somewhere in the config right? there's no way to have the eunit provider modify it's dependency's state, right?

from rebar3.

tsloughter avatar tsloughter commented on May 15, 2024

@talentdeficit the life cycle is:

  • Rebar3 starts
  • Config file is read in to the state
  • rebar_state:create_logic_providers/2 runs the init/1 of every available provider
  • The command is parsed out from the cli arguments
  • in rebar_core providers:get_target_providers is called to get the order of providers to run for the command
  • The profile for the command (test in the cause of common_test, and eunit should as well) is applied to the config with rebar_state:apply_profiles
  • do/1 is called for each provider in that list in order

So if you modify the test profile to include the macro in erl_opts in eunit provider's init/1 it'll be used when the compile provider is run.

from rebar3.

tsloughter avatar tsloughter commented on May 15, 2024

I don't remember what this is about and I opened it, I think I'll close it...

from rebar3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.