Skip to content

Support for headers.dhall configuration #2236

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 25 commits into from
Sep 25, 2021
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6a02fac
WIP support for ~/.config/dhall/headers.dhall
timbertson Jun 29, 2021
01438f1
load headers as dhall expressions, not JSON
timbertson Jul 24, 2021
b60c084
load headers from env in tests
timbertson Jul 25, 2021
8c859bb
user headers take precedent over inline headers
timbertson Jul 25, 2021
5c0711c
move UserHeaders out of HTTP manager
timbertson Aug 1, 2021
d8ff7ce
cleanup
timbertson Aug 1, 2021
9f33559
use caller's stack when importing headers
timbertson Aug 3, 2021
addfbaa
revert unnecessary change
timbertson Aug 3, 2021
54f2eda
Merge remote-tracking branch 'origin/master' into user-headers
timbertson Sep 15, 2021
e8ce0e8
PR feedback
timbertson Sep 16, 2021
65f3a12
Implement site headers loading as a plain dhall expression
timbertson Sep 18, 2021
b233d23
refer to site / user headers as originHeaders consistently
timbertson Sep 18, 2021
1799fd1
revert unnecessary diffs
timbertson Sep 18, 2021
9e51f6b
minor
timbertson Sep 18, 2021
85afb69
Load origin headers with an empty stack
timbertson Sep 19, 2021
dd85fba
revert the addition of OriginHeaders ImportMode
timbertson Sep 19, 2021
88f6fbd
reset dhall-lang submodule
timbertson Sep 19, 2021
c77f5a7
loadOriginHeaders: use parent stack instead of special-casing reentra…
timbertson Sep 21, 2021
02a65a3
fix compilation failure when building without http
timbertson Sep 24, 2021
a78e942
revert unnecessary diffs
timbertson Sep 24, 2021
14201cd
Merge remote-tracking branch 'origin/master' into user-headers
timbertson Sep 24, 2021
dd515d9
raise haddock coverage in Import module
timbertson Sep 24, 2021
0d9ffa2
fix haddock warning
timbertson Sep 25, 2021
84b4c6d
Merge remote-tracking branch 'origin/master' into user-headers
timbertson Sep 25, 2021
770cbab
fix compilation error when HTTP is disabled
timbertson Sep 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
raise haddock coverage in Import module
  • Loading branch information
timbertson committed Sep 24, 2021
commit dd515d9cab97f1d69c43b0205cbd44005b079410
3 changes: 2 additions & 1 deletion dhall/src/Dhall/Import.hs
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ fetchFresh (Env env) = do

fetchFresh Missing = throwM (MissingImports [])


-- | Fetch the text contents of a URL
fetchRemote :: URL -> StateT Status IO Data.Text.Text
#ifndef WITH_HTTP
fetchRemote (url@URL { headers = maybeHeadersExpression }) = do
Expand Down Expand Up @@ -1079,6 +1079,7 @@ originHeadersLoader headersExpr = do
emptyStatus :: FilePath -> Status
emptyStatus = makeEmptyStatus defaultNewManager defaultOriginHeaders

-- | See 'emptyStatus'
emptyStatusWithManager
:: IO Manager
-> FilePath
Expand Down