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

Make Cradle dependencies for stack and cabal more reasonable #209

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Jun 21, 2020

Closes #203

@fendor fendor requested review from mpickering and jneira and removed request for mpickering June 21, 2020 12:50
let relFp = makeRelative rootDir componentDir
cabalFiles' <- findCabalFiles componentDir
let cabalFiles = map (relFp </>) cabalFiles'
return $ map normalise $ cabalFiles ++ ["cabal.project", "cabal.project.local"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Does findCabalFiles need to change into the rootDir here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I dont think so, findCabalFiles needs to look in the sub-directory of a cradle if there is one. E.g. fir hie-plugin-api, the relevant cabal file is in the sub directory. Then it returns cabal files relative to the component directory. Afterwards we need to make the dependencies relative to the root dir, otherwise our promise that dependencies are relative to the root dir cannot be upheld.

@fendor fendor force-pushed the improve-cradle-deps branch 2 times, most recently from bee60e4 to 84cef5b Compare July 2, 2020 12:16
@fendor fendor merged commit cacebd4 into haskell:master Jul 6, 2020
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.

Rework paths in Cradle Dependencies
2 participants