-
Notifications
You must be signed in to change notification settings - Fork 18
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
Generated GenericPackageDescription is not strictly equal to cabal one #130
Comments
RE (3), I independently discovered that omitting
|
Wow, thanks for that elegant code. However, do you think that inform that field shouldn't be in cabal-to-dhall? could be done in parsing, at same time that other condTree* fields? |
Yeah, makes sense to do it there. I had it in my head that we were doing something with the conditionals that meant that it'd have to be a separate step, but I think I was getting that mixed up with the |
Hi, in the process of integrate dhall with etlas (a cabal fork suited for eta), we've found that the
GenericPackageDescription
generated by dhall-to-cabal is not equal to the generated by cabal itself usingparseGenericPackageDescription
.Although it is similar enough to generate the same output using
showGenericPackageDescription
(to be fair, the main goal of the package), i am afraid that you cant use it directly against the cabal api.I've setup a branch adding a strict comparation to analyze the changes between them:
options
,profOptions
,sharedOptions
,staticOptions
are an empty list in cabal and a list of(Compiler,[])
in dhall-to-cabal: i guess this probably would be not a problem but most cases fail with itCondNode {condTreeData = Executable {exeName = UnqualComponentName "dhall-to-cabal"
and dhall-to-cabalCondNode {condTreeData = Executable {exeName = UnqualComponentName ""
. Likely it could cause problems using against the api.condTreeConstraints
filled for each component and dhall-to-cabal empty: this one caused the first (and unique for now) error when trying to use it against cabal apidhall-to-cabal.dhall
there is a diff in the license:licenseRaw = Left (License (ELicense (ELicenseId MIT) Nothing))
for cabal andlicenseRaw = Right MIT
for dhall-to-cabalI think some sort of strict comparation can be useful to detect and analyze possible bugs. I will open a pr to discuss the relevance of and possible changes over the strict tests.
The text was updated successfully, but these errors were encountered: