Skip to content

Issue 4899 forward compat scheme - #5028

Closed
phadej wants to merge 5 commits into
haskell:masterfrom
phadej:issue-4899-forward-compat-scheme
Closed

phadej wants to merge 5 commits into
haskell:masterfrom
phadej:issue-4899-forward-compat-scheme

Conversation

@phadej

@phadej phadej commented Jan 14, 2018 •

Copy link
Copy Markdown
Collaborator

@hvr should cabal-version: 2.2 parser fail if scanned version is Nothing?
i.e. require that it's recognised by scanner?

/Note:/ thsi doesn't solve #4899 fully, as spec have to be clarified a bit: no tabs and \n or \r ending.


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 requested a review from hvr January 14, 2018 16:36
@phadej
phadej force-pushed the issue-4899-forward-compat-scheme branch 2 times, most recently from 74a0e02 to b483440 Compare January 14, 2018 18:47
-- | Destruct a 'ParseResult' into the emitted warnings and either
-- a successful value or
-- list of errors and possibly recovered a spec-version declaration.
runParseResult :: ParseResult a -> ([PWarning], Either (Maybe Version, [PError]) a)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@hvr, Left failure returns optional version.

@phadej
phadej force-pushed the issue-4899-forward-compat-scheme branch from b483440 to 5597bb7 Compare January 14, 2018 18:50
@phadej phadej added this to the 2.2 milestone Jan 14, 2018
@phadej
phadej force-pushed the issue-4899-forward-compat-scheme branch from 5597bb7 to e682fc0 Compare January 14, 2018 21:39
@phadej
phadej force-pushed the issue-4899-forward-compat-scheme branch from e682fc0 to 87dc292 Compare January 14, 2018 22:15
phadej and others added 4 commits January 15, 2018 21:33
This provides a provisional (i.e. hacky) retrofitted implementation of
the forward-compat scheme described in haskell#4899 for the cabal-2.2 branch

This hack works by constructing a dummy package description in case
the package description fails to be parsed via the standard parser,
and we detect a new-style cabal-spec declaration.
@phadej
phadej force-pushed the issue-4899-forward-compat-scheme branch from 87dc292 to 0e2a1e6 Compare January 15, 2018 20:58
@phadej
phadej force-pushed the issue-4899-forward-compat-scheme branch from 0e2a1e6 to d3e18c2 Compare January 15, 2018 22:03
@phadej phadej mentioned this pull request Jan 16, 2018
4 tasks done
@phadej

phadej commented Jan 16, 2018

Copy link
Copy Markdown
Collaborator Author

Closed in favour of #5046

@phadej phadej closed this Jan 16, 2018
@phadej
phadej deleted the issue-4899-forward-compat-scheme branch January 16, 2018 15:00
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