Skip to content
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

Remove the option in Dune_env.Stanza.t option #2472

Merged
merged 1 commit into from
Jul 30, 2019
Merged

Conversation

bobot
Copy link
Collaborator

@bobot bobot commented Jul 29, 2019

Since it is already a list, it simplifies some part and remove one negligible optimization, which allowed to not create env_node of empty env.

The documentation for env-vars is updated.

@bobot bobot requested review from emillon and rgrinberg as code owners July 29, 2019 15:37
@bobot bobot force-pushed the simplify-dune_env-option branch from 46da067 to 1d8f71e Compare July 29, 2019 15:37
Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good apart from this env_vars function.

src/dune_env.mli Outdated
val find : t -> profile:string -> config option
val env_vars : t -> profile:string -> Env.t
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it's quite confusing that this function doesn't have an option type like find. I think that the caller should turn the None to empty, or we should change find to work symmetrically.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right it simplifies other things and I removed env_vars.

@bobot bobot force-pushed the simplify-dune_env-option branch from 0c4c173 to 742be4e Compare July 30, 2019 10:48
   since it is already a list

Signed-off-by: François Bobot <francois.bobot@cea.fr>
@bobot bobot force-pushed the simplify-dune_env-option branch from 742be4e to 33967cc Compare July 30, 2019 11:22
@bobot bobot merged commit ed64846 into master Jul 30, 2019
@Alizter Alizter deleted the simplify-dune_env-option branch November 10, 2022 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants