Handle named references in structs correctly #90
Open
jcpetruzza wants to merge 2 commits intollvm-hs:masterfrom
Open
Handle named references in structs correctly #90jcpetruzza wants to merge 2 commits intollvm-hs:masterfrom
jcpetruzza wants to merge 2 commits intollvm-hs:masterfrom
Conversation
It was no longer possible to run the tests using
nix-shell as instructed in the README. There were
several issues:
- default.nix had outdated dependencies
- default.nix had `doCheck` set to false, which
meant that the test dependencies (tasty, etc)
wouldn't show up in the derivation and would
not be installed.
- haskell deps are to be found in `(propagated}buildInputs`
- the pinned version of nixpkgs was very old, and
prettyprinter was not available there
- stdenv.lib was deprecated long ago and it is no longer
available in recent versions of nixpkgs
Because of the last point, running nix-shell would effectively
only install ghc and cabal-install, and cabal would to build
llvm-hs, which is needed only for running the tests.
With the above fixed, running nix-shell would try to build
llvm-hs and llvm-hs-pure and fail: the default.nix files
there have also bitrot, have missing dependencies, etc.
Because llvm-hs and llvm-hs-pure are available in
nixpkgs now, we can rely on those versions instead. I'm
leaving the support for running versions from source, which
can be useful at some point once they are fixed upstream.
The added test-case would previously fail since:
```
; ModuleID = 'simple module'
%struct.coord2d = type {i32, i32}
%struct.vector = type {%struct.coord2d, %struct.coord2d}
@up = global %struct.vector {%struct.coord2d {i32 0, i32 0}, %struct.coord2d {i32 0, i32 1}}
```
would get pretty-printed as invalid code:
```
; ModuleID = 'simple module'
%struct.coord2d = type {i32, i32}
%struct.vector = type {%struct.coord2d, %struct.coord2d}
@up = global %struct.vector {%struct.coord2d zeroinitializer, {i32 0, i32 0} {i32 0, i32 1}}
```
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The added test-case would previously fail since:
would get pretty-printed as invalid code:
To run the tests, I had to update the nix support, that had bitrot