Skip to content

Fixes #94 #105

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

Merged
merged 1 commit into from
Jul 19, 2018
Merged

Fixes #94 #105

merged 1 commit into from
Jul 19, 2018

Conversation

domenkozar
Copy link
Contributor

cc @jmitchell @angerman @rvl

This should prepare stack2nix for a release compatible with LTS-12, as soon as cabal2nix is released.

@domenkozar domenkozar force-pushed the issue-94 branch 3 times, most recently from 66ab794 to b41e985 Compare July 11, 2018 17:36
@domenkozar
Copy link
Contributor Author

CI failure is due to too old stack

import Text.PrettyPrint.HughesPJClass (Doc)

cabal2nix :: Args -> FilePath -> Maybe Text -> Maybe FilePath -> DB.HackageDB -> IO (Either Doc Derivation)
cabal2nix Args{..} uri commit subpath hackageDB = do
let runCmdArgs = args $ fromMaybe "." subpath
hPutStrLn stderr $ unwords ("+ cabal2nix":runCmdArgs)
cabal2nixWithDB hackageDB runCmdArgs
options <- parseArgs runCmdArgs
cabal2nixWithDB hackageDB (options { optNixpkgsIdentifier = \i -> Just (binding # (i, path # ["pkgs", i])) })
Copy link
Contributor

Choose a reason for hiding this comment

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

So instead of using attr it will choose pkgs.attr?
Could this update of options be put into a separate function just to make it easier to understand?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure :)

parsePackageData :: PackageName -> U.PackageData -> P.PackageData
parsePackageData pn (U.PackageData _ vs') =
mapException (\e -> HackageDBPackageName pn (e :: SomeException)) $
Map.mapWithKey (P.parseVersionData pn) $ vs'
Copy link
Contributor

Choose a reason for hiding this comment

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

OK so deprecated package versions are noted in the preferred version range. And this function doesn't do filtering of packages by version range. Could the lack of any version range check cause problems or is it ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See NixOS/hackage-db#7 for context

Copy link
Contributor

Choose a reason for hiding this comment

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

OK got it I think. Any preferred version ranges or deprecated versions added by package authors have the potential to cause build failures if these packages are in a stackage LTS.

@domenkozar
Copy link
Contributor Author

Fixed :)

Copy link
Contributor

@rvl rvl left a comment

Choose a reason for hiding this comment

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

Great :-)

@domenkozar
Copy link
Contributor Author

Once this and #95 are merged, I'll prepare changelog and we can do 0.2 release.

@domenkozar
Copy link
Contributor Author

domenkozar commented Jul 16, 2018

I know you guys are extremely busy so here's my proposal to resolve the feedback loop. If no decision is made from IOHK, I'll do option c (as my only option) on 23rd July.

a) Grant me commit access (and possibly hackage maintainer access) as co-maintainer of stack2nix

b) I'm willing to be the core maintainer of stack2nix and stack2nix repository is transfered to me (with hackage ownership) and I'll make sure your PRs are reviewed - this means less risk+work for IOHK.

c) Fork stack2nix, rename it and release it as a fork (I'd like to avoid that as much as possible in favor of a or b)

@rvl
Copy link
Contributor

rvl commented Jul 17, 2018

Hi @domenkozar , We intended to give you commit access so that you could merge this, but I think in the process someone accidentally revoked their own admin access and hasn't been able to get it back yet.

@domenkozar
Copy link
Contributor Author

domenkozar commented Jul 17, 2018

Oh that's unfortunate. Thank you guys <3

@jmitchell
Copy link
Contributor

@domenkozar, you are now an admin collaborator on the repo. Thank you for volunteering to help.

@domenkozar domenkozar merged commit 062d7cc into input-output-hk:master Jul 19, 2018
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