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 load-time argv parsing #1148

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

emillon
Copy link
Collaborator

@emillon emillon commented Nov 14, 2019

Conf.action had side effects as it immediately parsed Sys.argv at load time. This has to be delayed so that we can link the lib in a test suite for example.

`Conf.action` had side effects as it immediately parsed `Sys.argv` at
load time. This has to be delayed so that we can link the lib in a test
suite for example.
@emillon emillon force-pushed the remove-load-time-parsing branch from 66135e1 to 33d738e Compare November 14, 2019 14:29
Copy link
Collaborator

@Julow Julow left a comment

Choose a reason for hiding this comment

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

That's a good idea but we need more ! We should move that part of Conf into an other module, so that Conf API is smaller and better defined and can then be documented and tested more easily.

@emillon
Copy link
Collaborator Author

emillon commented Nov 14, 2019

This is the part that blocks linking, the rest can be improved later.

Copy link
Collaborator

@gpetiot gpetiot 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

@emillon emillon merged commit 09714e1 into ocaml-ppx:master Nov 14, 2019
@emillon emillon deleted the remove-load-time-parsing branch November 14, 2019 15:21
@emillon
Copy link
Collaborator Author

emillon commented Nov 14, 2019

Thanks !

bogdan2412 pushed a commit to bogdan2412/ocamlformat that referenced this pull request Mar 28, 2020
`Conf.action` had side effects as it immediately parsed `Sys.argv` at
load time. This has to be delayed so that we can link the lib in a test
suite for example.
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.

4 participants