Open blackgnezdo opened 4 years ago
The error message is related to this: https://github.com/commercialhaskell/stack/issues/4882
After https://github.com/google/proto-lens/pull/392, we go one step further and get this error:
$ stack runghc -- bootstrap.hs
Cloning 0bef8c2f3da645f068b8a26ac168c1da41608182 from https://github.com/google/proto-lens
Unsupported tarball from /tmp/with-repo-archive212759/foo.tar: Symbolic link dest not found from proto-lens/proto-lens-imports/google to ../../google/protobuf/src/google, looking for proto-lens/../google/protobuf/src/google.
This may indicate that the source is a git archive which uses git-annex.
See https://github.com/commercialhaskell/stack/issues/4579 for further information.
bootstrap.hs: readCreateProcess: stack "--stack-yaml=stack-bootstrap.yaml" "path" "--local-install-root" (exit 1): failed
Apparently related to https://github.com/commercialhaskell/stack/issues/4579.
I tried various things but couldn't figure out how to fix this symbolic link error. The new stack doesn't seem to give an escape hatch for ignoring it. @judah any idea?
Oof, sorry, I forgot about this problem. I encountered it a while ago here: https://github.com/commercialhaskell/stack/issues/5004#issuecomment-527197457
Previously I just used stack-1.* when bootstrapping, but that won't work anymore due to the changes to proto-lens-runtime's reexport-modules. I suppose one fairly manual approach would be:
That might be worth trying to unblock the release. I'll see if I can think of something better.
Actually, currently we're in a good place because we're not making any backwards-incompatible changes to the API. So I was able to regenerate it by removing the git-related logic altogether and using the in-tree packages for bootstrapping. It's not a great long-term solution, but it should work for the upcoming release:
diff --git a/bootstrap.hs b/bootstrap.hs
index 1d55ed4..9a00f37 100755
--- a/bootstrap.hs
+++ b/bootstrap.hs
@@ -47,9 +47,6 @@ main = do
-- overwriting the previous versions.
callProcess "git" ["checkout", bootstrapCommit, "--",
bootstrapModuleRoot </> "Proto"]
- [sha] <- lines <$> readProcess "git" ["rev-parse", bootstrapCommit] ""
- -- Append the bootstrapping commit hash to the yaml file.
- appendFile bootstrappingYaml (" commit: " ++ sha ++ "\n")
[installRoot] <- lines <$> readProcess stack
[useBootstrappingYaml, "path", "--local-install-root"] ""
let protocGenHaskell = installRoot </> "bin/proto-lens-protoc"
diff --git a/stack-bootstrap.yaml b/stack-bootstrap.yaml
index a30c62c..6edfe97 100644
--- a/stack-bootstrap.yaml
+++ b/stack-bootstrap.yaml
@@ -1,15 +1,11 @@
-resolver: lts-12.7
+resolver: lts-15.15
packages:
+- proto-lens
- proto-lens-protoc
+- proto-lens-runtime
# Build the current HEAD proto-lens-protoc against older revisions of proto-lens
# and proto-lens-descriptors that are consistent with each other.
extra-deps:
- ghc-source-gen-0.4.0.0
-- git: https://github.com/google/proto-lens
- subdirs:
- - proto-lens
- - proto-lens-runtime
- # A line like below will be appended by bootstrap.hs.
- # commit: 0bef8c2f3da645f068b8a26ac168c1da41608182