Skip to content

[feature] defered dotenv evaluation #2151

@harlequin

Description

@harlequin

Is your feature request related to a problem? Please describe.

In the current moon implementation the evaluation of dotenv files happen in a very early stage. After evaluation the task graph is directly created.

This avoids a scenario like , task 1 is creating a valid dotenv file and task2 shall read this and take the env variables for further actions.

Describe the solution you'd like

There are 2 possibilities which can be implemented:-

  1. moon will get a new type of tasks configuration

    with this moon can behave like cmake (configuration phase, build phase)
    moon will start with tasks marked as configuration (for example tasks which creates dotenv files) and we would have all the benefits of dependencies and so on
    moon will evaluate the dotenv/action graph as normal (without the configuration task types)
    moon will execute the tasks as normal

  2. mark dotenv loading as deferred

    This would implies that the task which declared as deferred dotenv can't be cached
    But would give the possibility of evaluating this during task execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions