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

Remove errors and warning for local packages without a library component #801

Merged

Conversation

kmicklas
Copy link
Collaborator

Currently ob shell and derivative commands will print errors like this if you have a local package without a library component:

Haskell package has no library component
Failed to find buildable packages in $path_to_cabal_file

I don't see any reason why this should be considered an erroneous case.

This removes the Failed to find buildable packages in ... warning, but I don't believe it's necessary since any actual errors or warnings will still be reported by parseCabalPackage.

I have:

  • Based work on latest develop branch
  • Looked for lint in my changes with hlint . (lint found code you did not write can be left alone)
  • Run the test suite: $(nix-build -A selftest --no-out-link)
  • (Optional) Run CI tests locally: nix-build release.nix -A build.x86_64-linux --no-out-link (or x86_64-darwin on macOS)

Copy link
Collaborator

@3noch 3noch left a comment

Choose a reason for hiding this comment

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

Seems reasonable.

@kmicklas
Copy link
Collaborator Author

kmicklas commented Oct 1, 2020

@3noch Anything blocking merging this?

@@ -386,9 +387,6 @@ parsePackagesOrFail dirs' = do
"No valid, buildable packages found" <> (if null dirs then "" else " in " <> intercalate ", " dirs)
Just xs -> pure xs

unless (null pkgDirErrs) $
putLog Warning $ T.pack $ "Failed to find buildable packages in " <> intercalate ", " pkgDirErrs
Copy link
Member

Choose a reason for hiding this comment

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

Is this change related?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's related in that you also get this warning for a package with no library component, in addition to the error above. I don't think either of them should be considered out of the ordinary.

Copy link
Member

Choose a reason for hiding this comment

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

Ah and there is no more Either.

@ali-abrar ali-abrar merged commit 9151904 into obsidiansystems:develop Nov 11, 2020
@ali-abrar
Copy link
Member

Thanks, Kenny

@kmicklas kmicklas deleted the local-exe-package-errors branch November 11, 2020 20:56
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.

4 participants