You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh y
8000
our session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
8000
Verbatim imports put at bottom of stanza first time #522
This is something we want to fix. I am away from my computer for the next couple of days. Still, I took a quick look at the code. From what I understand, these are the underlying issues:
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨
Makes sense! I don't know if you have any end-to-end tests, but I think a simple end-to-end test for this could be:
In an empty directory, create package.yaml that imports a common stanza adding a dependency (e.g. aeson or containers) + write a library file using that dependency (such that a cabal file lacking that dependency would fail to build)
Activity
sol commentedon Sep 21, 2022
Hi @brandon-leapyear 👋 thanks for reporting this!
This is something we want to fix. I am away from my computer for the next couple of days. Still, I took a quick look at the code. From what I understand, these are the underlying issues:
importsas the first field of a section (fixes #486) #490. Our acceptance tests accept any field order, so adding an acceptance test may require some extra work. We have existing tests for field sorting in:hpack/test/Hpack/Render/DslSpec.hs
Line 134 in 7c46a3e
#490is not covered by those tests.fieldOrder(and by extension only when we already have a.cabal-file):hpack/src/Hpack/Render.hs
Line 126 in d9cbc10
brandon-leapyear commentedon Sep 21, 2022
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨
Makes sense! I don't know if you have any end-to-end tests, but I think a simple end-to-end test for this could be:
package.yamlthat imports a common stanza adding a dependency (e.g.aesonorcontainers) + write a library file using that dependency (such that a cabal file lacking that dependency would fail to build)hpackandcabal