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

Adds integration test for #3396 #3502

Merged

Conversation

denibertovic
Copy link
Contributor

The provided test package (dinamo), that is part of a custom snapshot has
a malformed cabal file. Specifically, it's setting the required cabal
version to an invalid number (9001). This test makes sure that
stack does not care about this if we do not actually use the package
in our project.

Closes #3396

@denibertovic
Copy link
Contributor Author

cc @snoyberg

@denibertovic
Copy link
Contributor Author

Bah, let me know if I should get rid of the style changes in IntegrationSpec.hs (those were automatic). The only change there is just uncommenting "*.gz" in the toCopyRoot function... I'm not sure why it was commented out in the first place.

@snoyberg
Copy link
Contributor

  1. Please do roll back those style changes
  2. I'm pretty sure the base-4.10.0.0.tar.gz file isn't necessary.
  3. I think the Main.hs file needs to copy the custom.index.tar.gz file to $HOME/.stack/indices/CustomIndex/00-index.tar.gz before running stack build

@denibertovic
Copy link
Contributor Author

@snoyberg I've added the necessary steps and removed the files we don't need, as well as the formatting.

One note though: We don't really need the invalid dinamo tarball nor do we need the custom.index.tar.gz file anymore but I thought it would be useful to keep them around if we ever needed to re-use in similar tests (so we don't have to create them from scratch again). What do you think?

createDirectory (home </> ".stack" </> "indices" </> "CustomIndex")
copy "CustomIndex/00-index.tar" (home </> ".stack" </> "indices" </> "CustomIndex" </> "00-index.tar")
copy "CustomIndex/01-index.tar" (home </> ".stack" </> "indices" </> "CustomIndex" </> "01-index.tar")
copy "CustomIndex/01-index.cache" (home </> ".stack" </> "indices" </> "CustomIndex" </> "01-index.cache")
Copy link
Contributor

Choose a reason for hiding this comment

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

Better not to copy over the cache, especially since the format will change over time. Also, I'd be interested in whether this works without the 00-index.tar file as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@snoyberg good point. Removing the cache file. Also, 00-index.tar is not needed so removing that as well.

@snoyberg
Copy link
Contributor

I'd probably leave off the unnecessary tarballs for now, it shouldn't be too hard to recreate something similar.

The provided test package (dinamo), that is part of a custom snapshot has
a malformed cabal file. Specifically, it's setting the required cabal
version to an invalid number (9001). This test makes sure that
stack does not care about this if we do not actually use the package
in our project.
@denibertovic
Copy link
Contributor Author

@snoyberg Updated (removed tarballs that we don't need right now).

@snoyberg snoyberg merged commit 0e756d4 into commercialhaskell:master Oct 24, 2017
@denibertovic denibertovic deleted the deni/3396-package-indices branch October 24, 2017 16:49
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.

None yet

2 participants