Skip to content
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

Move start script to bindists & document #804

Merged
merged 7 commits into from
Apr 2, 2019
Merged

Conversation

Profpatsch
Copy link
Contributor

This PR improves the start script and the bindists.

  • make the start script compile a runnable hello world module
  • generate bindist file from official upstream hash files
  • move from nixpkgs to bindists

The user is now immediately able to build a simple Haskell binary.
We provide a full minimal example of a working project, getting the
user up & running from a state they know is working (or at least one
we guarantee to work).

Each of the generated bazel files is documented, to ease understanding
of the template.
Copy link
Contributor

@guibou guibou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

haskell/gen_ghc_bindist.py Outdated Show resolved Hide resolved
haskell/gen_ghc_bindist.py Outdated Show resolved Hide resolved
@Profpatsch
Copy link
Contributor Author

So, importing the GHC_BINDIST dict from a different module blows up with our (deprecated and very old) version of Skydoc. For now I’m copying the generated code into the file.

@mboes
Copy link
Member

mboes commented Apr 2, 2019

Our version of Skydoc is deprecated but unfortunately there is no good replacement for it as of yet. The new Stardoc is a lot less feature complete.

Some bindist hashes were broken, because they were copied by hand.
This means a `rules_haskell` release is broken, at least for users who
try to use the bindists we provide.

One only notices after downloading a heavy bindists and the hashes
don’t match, leading to a frustrating experience.

Running the `gen-ghc-bindist` uses the official upstream hashes to
generate a bzl file (really: dump a python dict), which can `load`ed
by bazel, eliminating future maintenance errors.
We want to make it easy to new users. We can’t assume most users have
nix installed, so we default to the bindists.

We should also provide auto-detection of nix and generate a nixpkgs
script in that case. Tracking issue:
#784

Closes: #604
Remove the repository override, because we always deploy the current
start script from master, but it fetches the latest release (not
master), so we should test that.

Move from a simple fetch to testing the buildable example.
Previously the start script generated a nixpkgs-compatible WORKSPACE,
but since we switched it to bindists now, it should run in the bindist
CI.
Copy link
Contributor

@guibou guibou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mboes mboes merged commit 91badfe into master Apr 2, 2019
@mboes mboes deleted the start-script-bindists branch April 2, 2019 17:29
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.

3 participants