Skip to content

Nixify hackage-to-nix output #1574

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
Aug 4, 2022
Merged

Nixify hackage-to-nix output #1574

merged 4 commits into from
Aug 4, 2022

Conversation

hamishmack
Copy link
Collaborator

@hamishmack hamishmack commented Aug 3, 2022

We have been using readFile and fromJSON to read a .json a 60MB .json file. This change puts the information contained in the json file into .nix files that are imported when needed (rather than all at once). This seems to save around 1s at eval time.

Tested with:

time nix-instantiate -E '(import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "hello" {}'
time nix-instantiate -E '(import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "haskell-language-server" {}'

See also input-output-hk/nix-tools#118

@hamishmack
Copy link
Collaborator Author

bors try

iohk-bors bot added a commit that referenced this pull request Aug 3, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 3, 2022

try

Timed out.

hamishmack added a commit to input-output-hk/nix-tools that referenced this pull request Aug 3, 2022
We have been using `readFile` and `fromJSON` to read a `.json` a 60MB .json file.  This change puts the information contained in the json file into `.nix` files that are imported when needed (rather than all at once).  This seems to save around 1s at eval time.

Tested with:
```
time nix-instantiate -E '(import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "hello" {}'
time nix-instantiate -E '(import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "haskell-language-server" {}'
```

See also input-output-hk/haskell.nix#1574
@hamishmack
Copy link
Collaborator Author

bors try

iohk-bors bot added a commit that referenced this pull request Aug 3, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 3, 2022

try

Build failed:

@hamishmack
Copy link
Collaborator Author

bors try

iohk-bors bot added a commit that referenced this pull request Aug 4, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 4, 2022

try

Timed out.

@hamishmack hamishmack merged commit 61dea04 into master Aug 4, 2022
@iohk-bors iohk-bors bot deleted the hkm/nixify-hackage-to-nix branch August 4, 2022 06:31
andreabedini pushed a commit to andreabedini/haskell.nix that referenced this pull request Sep 14, 2022
)

We have been using `readFile` and `fromJSON` to read a `.json` a 60MB .json file.  This change puts the information contained in the json file into `.nix` files that are imported when needed (rather than all at once).  This seems to save around 1s at eval time.

Tested with:
```
time nix-instantiate -E '(import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "hello" {}'
time nix-instantiate -E '(import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "haskell-language-server" {}'
```

See also input-output-hk#1574
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.

2 participants