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

Fix the stack build #113

Closed
greglaun-google opened this issue Dec 31, 2020 · 3 comments · Fixed by #116
Closed

Fix the stack build #113

greglaun-google opened this issue Dec 31, 2020 · 3 comments · Fixed by #116

Comments

@greglaun-google
Copy link

greglaun-google commented Dec 31, 2020

I'm unable to build the examples from master on a stock Ubuntu VM using Stack. I'm following the instructions on the README.

Steps to reproduce:

  1. Grab an Ubuntu VM. I've tried several versions, including 20.10 and 18.04 LTS.
  2. Run 'sudo apt-get update`
  3. Generate an SSH key and upload it to GitHub. This step is required because stack.yaml uses GitHub urls that start with "git://", which forces the use to authenticate. This would be simplified if stack.yaml used the https GitHub urls.
  4. Install Stack following https://docs.haskellstack.org/en/stable/install_and_upgrade/. I also tried older versions of Stack to try to build older commits.
  5. Install Nix following https://nixos.org/download.html
  6. git clone https://github.com/awakesecurity/gRPC-haskell.git
  7. Run nix-shell release.nix -A grpc-haskell.env, which succeeds.
  8. Run stack build --fast && stack test --fast, which fails.

Expected result: Build succeeds.

Actual result:

build fails with an error

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for grpc-haskell-0.0.2.0:
    proto3-suite-0.4.0.0 from stack configuration does not match >=0.4.2.0 
    proto3-wire-1.1.0 from stack configuration does not match >=1.2.0  (latest matching version is 1.2.0)
needed since grpc-haskell is a build target.

It is straightforward to fix stack build by upgrading the dependencies in stack.yaml. However, stack test and stack build --flag grpc-haskell:with-examples both fail. Both complain about missing dependencies.

I tried installing various versions of grpc in the ambient OS (outside of the nix shell), but that did not help. For example, I tried gRPC 1.2 and gRPC 1.22 with various git commits.

I'm unable to make the instructions as written work with any combination of Stack, Ubuntu, and gRPC or any git commit. My guess is that when the Stack build works it's because it's pulling extra dependencies from the developers' machines, and those dependencies aren't explicitly modeled in the build configs.

@Gabriella439
Copy link
Contributor

@greglaun-google: My personal inclination is to drop the stack support (unless somebody else is willing to maintain the stack instructions). The Nix workflow requires less work for us to maintain, and it's what we use within our organization.

@greglaun-google
Copy link
Author

Dropping stack support sounds good to me. Supporting multiple build systems sounds like a lot of overheard in general.

Gabriella439 added a commit that referenced this issue Jan 13, 2021
@Gabriella439
Copy link
Contributor

The PR to drop stack support is up here: #116

Gabriella439 added a commit that referenced this issue Jan 13, 2021
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 a pull request may close this issue.

2 participants