Skip to content

Remove 'ExecutableScopeUnknown'. #5085

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
Feb 1, 2018
Merged

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Jan 31, 2018

Fixes #5083
Related to #5003

Note: buildable: field has All semantics. scope: has
AnyPrivate semantics. Both might be surprising, but are "logical".

https://hackage.haskell.org/package/Cabal-2.0.1.1/docs/src/Distribution.PackageDescription.Parse.html#line-248

Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!

@phadej phadej added this to the 2.2 milestone Jan 31, 2018
@phadej phadej requested review from 23Skidoo and hvr January 31, 2018 19:30
@23Skidoo
Copy link
Member

We didn't allow users to write scope: unknown, so this is backwards compatible, right? Otherwise LGTM.

@phadej
Copy link
Collaborator Author

phadej commented Jan 31, 2018

ReadP parser is

instance Text ExecutableScope where
      parse = Parse.choice
         [ Parse.string "public"  >> return ExecutablePublic
         , Parse.string "private" >> return ExecutablePrivate
         ]

so cabal-2.0 didn't accept anything else than public and private. I think I made Parsec more lenient to allow roundtrip, so it (= removal or pretty-printer fix) was forgotten to do item.

@23Skidoo
Copy link
Member

OK, let's merge.

@phadej
Copy link
Collaborator Author

phadej commented Jan 31, 2018

Failure is legit, added test in master "conflicts". EDIT: amended

Solves haskell#5087
Related to haskell#5003

Note: `buildable: ` field has `All` semantics. `scope: ` has
`AnyPrivate` semantics. Both might be surprising, but are "logical".

https://hackage.haskell.org/package/Cabal-2.0.1.1/docs/src/Distribution.PackageDescription.Parse.html#line-248
@23Skidoo 23Skidoo merged commit c3238a0 into haskell:master Feb 1, 2018
@23Skidoo
Copy link
Member

23Skidoo commented Feb 1, 2018

Merged, thanks!

@phadej phadej deleted the fix-scope-field branch February 1, 2018 08:30
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.

2 participants