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

Support reading test-specific environment from *ENV.dhall file #2268

Merged
merged 4 commits into from
Aug 15, 2021

Conversation

timbertson
Copy link
Collaborator

This will be a new requirement for the standard test suite as part of dhall-lang/dhall-lang#1192

I did this on my WIP branch (#2236), but it seems independent enough to review early.

Copy link
Collaborator

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

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

I don't see much to complain about, but I'm not very familiar with the context, so I'd prefer if @Gabriel439 could review this too.

setEnv :: (Text, Text) -> IO (Text, Maybe Text)
setEnv (k, v) = do
old <- Turtle.need k
_ <- putStrLn $ Text.unpack $ "Setting env: "<>k <> "="<>v
Copy link
Collaborator

Choose a reason for hiding this comment

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

If needed, such logging should go to stderr.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would omit the logging here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed 👍

Copy link
Collaborator

@Gabriella439 Gabriella439 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! Just one comment

setEnv :: (Text, Text) -> IO (Text, Maybe Text)
setEnv (k, v) = do
old <- Turtle.need k
_ <- putStrLn $ Text.unpack $ "Setting env: "<>k <> "="<>v
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would omit the logging here

@Gabriella439 Gabriella439 merged commit 75d2822 into dhall-lang:master Aug 15, 2021
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.

3 participants