-
Notifications
You must be signed in to change notification settings - Fork 710
Store hie files #9019
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
Store hie files #9019
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a977cd9
Generate hie files for dependencies
nlander 984bca6
Don't fail on missing .hie files
nlander b09fcee
Add GhcOptions flag for -hiedir
nlander 458703c
Add golden tests
nlander b31a7dd
Add -hiedir to complex build info test
nlander 024348b
Run fourmolu
nlander adbf378
Revert "Don't fail on missing .hie files"
nlander 6c02783
Put .hie files in extra-compilation-artifacts
nlander 529b0c9
Check ghc supports -hiedir flag
nlander b35560a
Run fourmolu
nlander e4ad7ad
Add changelog
nlander ddeeecf
Add extra-compilation-artifacts to buildInfo test
nlander af6e24d
Correct testLibInstallDir for Windows
nlander 3edc730
Add constant extraCompilationArtifacts
nlander 5ab2403
Update changelog
nlander d231456
Remove redundant Maybe in Flag
nlander 0deba9d
Set flagHie the same for GHCJS
nlander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module HieLocal where | ||
hieLocal = "INSTALL ME" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# cabal v2-update | ||
Downloading the latest package list from test-local-repo | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- hie-dependency-0.1.0.0 (lib) (requires build) | ||
- hie-0.1.0.0 (lib) (first run) | ||
Configuring library for hie-dependency-0.1.0.0... | ||
Preprocessing library for hie-dependency-0.1.0.0... | ||
Building library for hie-dependency-0.1.0.0... | ||
Installing library in <PATH> | ||
Configuring library for hie-0.1.0.0... | ||
Preprocessing library for hie-0.1.0.0... | ||
Building library for hie-0.1.0.0... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
packages: hie . | ||
package hie-dependency | ||
ghc-options: -fwrite-ide-info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = withShorterPathForNewBuildStore $ \storeDir -> cabalTest $ withRepo "repo" $ do | ||
skipUnlessGhcVersion ">= 8.8" | ||
cabalG ["--store-dir=" ++ storeDir] "v2-build" ["hie"] | ||
liftIO $ do | ||
installedDependencyLibDir <- findDependencyInStore storeDir "hie-dependency" | ||
shouldExist $ installedDependencyLibDir </> "lib" </> "extra-compilation-artifacts" </> "HieDependency.hie" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: hie-local | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Elodie Lander | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
exposed-modules: HieLocal | ||
build-depends: base | ||
default-language: Haskell2010 | ||
ghc-options: -fwrite-ide-info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module Hie where | ||
import HieDependency (hieDependency) | ||
hie = hieDependency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: hie | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Elodie Lander | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
exposed-modules: Hie | ||
build-depends: base | ||
, hie-dependency | ||
default-language: Haskell2010 |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/CopyHie/repo/hie-dependency-0.1.0.0/HieDependency.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module HieDependency where | ||
hieDependency = "INSTALL ME" |
12 changes: 12 additions & 0 deletions
12
cabal-testsuite/PackageTests/CopyHie/repo/hie-dependency-0.1.0.0/hie-dependency.cabal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: hie-dependency | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Elodie Lander | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
exposed-modules: HieDependency | ||
build-depends: base | ||
default-language: Haskell2010 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Setup configure | ||
Configuring library for hie-local-0.1.0.0... | ||
# Setup build | ||
Preprocessing library for hie-local-0.1.0.0... | ||
Building library for hie-local-0.1.0.0... | ||
# Setup copy | ||
Installing library in <PATH> | ||
# Setup register | ||
Registering library for hie-local-0.1.0.0... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Setup configure | ||
Configuring library for hie-local-0.1.0.0... | ||
# Setup build | ||
Preprocessing library for hie-local-0.1.0.0... | ||
Building library for hie-local-0.1.0.0... | ||
# Setup copy | ||
Installing library in <PATH> | ||
# Setup register | ||
Registering library for hie-local-0.1.0.0... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = setupAndCabalTest $ withPackageDb $ do | ||
skipUnlessGhcVersion ">= 8.8" | ||
setup_install ["hie-local"] | ||
env <- getTestEnv | ||
shouldExist $ testLibInstallDir env </> "hie-local-0.1.0.0" </> "extra-compilation-artifacts" </> "HieLocal.hie" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a bit unfortunate to be placing files directly in
extra-compilation-artifacts
. My hope when we agreed on this design was that users would instead place things in distinct subdirectories to avoid clutter and the potential for name conflicts. I wonder if it wouldn't be better to rather place these inodir </> extraCompilationArtifacts </> "hie"
or similar.Perhaps it's not too late to revisit this given that we haven't yet released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems reasonable to me. I will get a PR going for that, probably on Monday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed by #9244