Skip to content

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

Merged
Gabriella439 merged 4 commits intodhall-lang:masterfrom
timbertson:test-env
Aug 15, 2021
Merged

Support reading test-specific environment from *ENV.dhall file#2268
Gabriella439 merged 4 commits intodhall-lang:masterfrom
timbertson:test-env

Conversation

@timbertson
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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