Skip to content

make variable expansion in repl arguments #1381

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

Merged
merged 4 commits into from
Jul 2, 2020
Merged

Conversation

aherrmann
Copy link
Member

Closes #1377

  • Deduplicates repl_ghci_args to the autogenerated @repl targets to haskell_binary|library|test. These repl_ghci_args are already forwarded to the REPL internally.
  • Ensure that compiler_flags and repl_ghci_args are forwarded to the REPL with make variables expanded.
    To that end we add user_compiler_flags and repl_ghci_args fields to the HaskellInfo provider which carried the expanded values.
  • Perform make variable expansion on the repl_ghci_args attribute to haskell_repl directly for consistency. To that end, add a data attribute to haskell_repl to enable location references.
  • Add a regression test for make-style variables don’t appear to be expanded in repl_ghci_args  #1377

The `repl_ghci_args` attribute to `haskell_library|binary|test` is
already forwarded to `haskell_repl` internally. Duplicating the
attribute on the `haskell_repl` invocation is redundant and duplicates
arguments.
aherrmann added 3 commits July 1, 2020 15:41
The expansion requires the target's rule `ctx`, so we perform expansion
at the target and track the expanded flags in the `HaskellInfo` provider
to make it available to `haskell_repl`.

`user_compiler_flags` is distinct from `compiler_flags` in that the
former holds only flags explicitly provided by the user while the latter
includes flags that are generated by rules_haskell.
Perform make variable expansion on the `repl_ghci_args` attribute to
`haskell_repl` directly. Add a `data` attribute to `haskell_repl` to
enable location references to data files in `repl_ghci_args`.
@aherrmann aherrmann force-pushed the repl-make-variables branch from 05a5b36 to 9311fa1 Compare July 1, 2020 13:42
@aherrmann aherrmann added the merge-queue merge on green CI label Jul 2, 2020
@mergify mergify bot merged commit ed88e29 into master Jul 2, 2020
@mergify mergify bot deleted the repl-make-variables branch July 2, 2020 07:56
@mergify mergify bot removed the merge-queue merge on green CI label Jul 2, 2020
aherrmann added a commit that referenced this pull request Jul 2, 2020
#1381 added a dedicated
`data` attribute to `haskell_repl` which needs to be tracked correctly
when data runfiles are constructed explicitly.
aherrmann added a commit that referenced this pull request Jul 2, 2020
#1381 added a dedicated
`data` attribute to `haskell_repl` which needs to be tracked correctly
when data runfiles are constructed explicitly.
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.

make-style variables don’t appear to be expanded in repl_ghci_args
2 participants