Skip to content

[BREAKING] Add new reserved keywords.#3627

Merged
axic merged 1 commit intodevelopfrom
additional-keywords
Jun 12, 2018
Merged

[BREAKING] Add new reserved keywords.#3627
axic merged 1 commit intodevelopfrom
additional-keywords

Conversation

@ekpyron
Copy link
Copy Markdown
Collaborator

@ekpyron ekpyron commented Mar 1, 2018

Closes #2182.

@chriseth
Copy link
Copy Markdown
Contributor

chriseth commented Mar 1, 2018

If you add Closes #2182 to the description of the pull request, that issue will be automatically closed and also linked to this pull request.

@erak erak force-pushed the additional-keywords branch from 6de5f25 to 4522978 Compare March 1, 2018 13:21
};


for (const auto& keyword : keywords) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Coding style: no space in front of : except in a ? b : c.

Copy link
Copy Markdown
Contributor

@chriseth chriseth Mar 1, 2018

Choose a reason for hiding this comment

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

And { on a line of its own.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for pointing that out :)

@chriseth chriseth changed the title Add new reserved keywords from #2182. [BREAKING] Add new reserved keywords from #2182. Mar 1, 2018
@chriseth
Copy link
Copy Markdown
Contributor

chriseth commented Mar 1, 2018

Please also add a line to Changelog.txt describing the change. It is probably a good idea for this PR to not add it to the changelog of 0.4.21 but instead start a new version 0.5.0. We will then merge it when 0.5.0 will be the next release.

@chriseth
Copy link
Copy Markdown
Contributor

chriseth commented Mar 1, 2018

Looks good! I'm not adding a positive review on purpose, so we do not accidentally merge this PR.

CHECK_PARSE_ERROR(text, "Expected identifier");
}

BOOST_AUTO_TEST_CASE(keyword_is_reserved)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this test case be extracted and merged with current keywords?

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.

OK, see #3633

axic
axic previously requested changes Mar 2, 2018
Copy link
Copy Markdown
Contributor

@axic axic left a comment

Choose a reason for hiding this comment

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

There is a section in the documentation listing the reserved keywords, that should be updated too.

@ekpyron ekpyron force-pushed the additional-keywords branch 2 times, most recently from eb163bc to 1a5e5f0 Compare March 2, 2018 09:52
@ekpyron ekpyron force-pushed the additional-keywords branch from 1a5e5f0 to 9f30e74 Compare March 2, 2018 09:56
@axic
Copy link
Copy Markdown
Contributor

axic commented Mar 2, 2018

Please rebase since #3633 was merged.

@chriseth
Copy link
Copy Markdown
Contributor

chriseth commented Mar 5, 2018

We should also add copy and copyof.

@axic
Copy link
Copy Markdown
Contributor

axic commented Mar 5, 2018

If you add Closes #2182 to the description of the pull request

Please do that and do not include it in the commit messages.

@ekpyron ekpyron force-pushed the additional-keywords branch from d03676d to 8575b5b Compare March 12, 2018 09:43
@ekpyron ekpyron self-assigned this May 4, 2018
@ekpyron ekpyron changed the base branch from develop to 050 May 8, 2018 09:47
@ekpyron ekpyron force-pushed the additional-keywords branch from 8575b5b to f62820c Compare May 8, 2018 09:48
@ekpyron ekpyron changed the title [BREAKING] Add new reserved keywords from #2182. [BREAKING] Add new reserved keywords. May 8, 2018
@ekpyron ekpyron force-pushed the additional-keywords branch 3 times, most recently from 1a680bf to 8e1e611 Compare May 8, 2018 09:50
@ekpyron ekpyron dismissed axic’s stale review May 8, 2018 09:55

Outdated.

@ekpyron
Copy link
Copy Markdown
Collaborator Author

ekpyron commented May 9, 2018

I removed the constructor keyword from this PR, since it breaks the tests unless the parser is updated, so it makes more sense to only add it in #4106.

@ekpyron ekpyron force-pushed the additional-keywords branch 2 times, most recently from 5cf64ca to 566b753 Compare May 14, 2018 18:46
@ekpyron
Copy link
Copy Markdown
Collaborator Author

ekpyron commented May 15, 2018

@chriseth I find the list of new keywords (and especially copy) to be a bit excessive myself and it seems to me more frequent breaking releases make more sense.
The question is whether there is a subset of this list that should definitely be in 0.5.0.

@chriseth
Copy link
Copy Markdown
Contributor

100%: constructor and emit
80%: mutable, immutable, unchecked, override
60%: alias, typedef

@ekpyron ekpyron force-pushed the additional-keywords branch from 911cead to c6434ea Compare May 15, 2018 16:27
@ekpyron ekpyron force-pushed the additional-keywords branch from c6434ea to 2106f82 Compare May 17, 2018 15:57
@axic axic changed the base branch from 050 to develop May 30, 2018 06:04
@axic axic force-pushed the additional-keywords branch from 2106f82 to 521f5fc Compare June 12, 2018 09:39
@axic
Copy link
Copy Markdown
Contributor

axic commented Jun 12, 2018

Rebased.

@ekpyron
Copy link
Copy Markdown
Collaborator Author

ekpyron commented Jun 12, 2018

@axic We still need to decide whether we want to keep this PR at all or which subset to keep.
constructor and emit are handled in separate commits, but we need to decide which of the other ones should in fact be reserved in 0.5.0 already.

@axic
Copy link
Copy Markdown
Contributor

axic commented Jun 12, 2018

I think we should just merge this. The only debatable one I think is topic and perhaps fallback because we don't know yet if we'll have wildcard or fallback, etc.

@ekpyron
Copy link
Copy Markdown
Collaborator Author

ekpyron commented Jun 12, 2018

@axic I think what started the discussion actually was whether to keep copy, since it may be commonly used and break a lot of code. (@chriseth brought that up in an now outdated Changelog.md review comment)

@axic
Copy link
Copy Markdown
Contributor

axic commented Jun 12, 2018

Also if this is merged first and constructor/emit later then those are just moved from the reserved list to the "new keywords" line.

@axic
Copy link
Copy Markdown
Contributor

axic commented Jun 12, 2018

It seems copy is used in stringutils so that might be something we need to consider. Nothing else seems to break.

@axic
Copy link
Copy Markdown
Contributor

axic commented Jun 12, 2018

I'd take a shortcut and merge the non-contentious ones here and open a new PR for the rest.

@ekpyron ekpyron force-pushed the additional-keywords branch from 521f5fc to fb9dff1 Compare June 12, 2018 10:33
@ekpyron
Copy link
Copy Markdown
Collaborator Author

ekpyron commented Jun 12, 2018

Removed copy, topic and fallback from the list.
I would still not include constructor and emit here, since the workarounds will fail once the keywords are introduced, so I think it's best to handle them separately altogether.

@ekpyron ekpyron force-pushed the additional-keywords branch from fb9dff1 to f35b5e7 Compare June 12, 2018 11:24
axic
axic previously approved these changes Jun 12, 2018
@axic
Copy link
Copy Markdown
Contributor

axic commented Jun 12, 2018

Confirmed against the issue.

@ekpyron
Copy link
Copy Markdown
Collaborator Author

ekpyron commented Jun 12, 2018

Removed const as well.

@axic axic merged commit d1e7e9e into develop Jun 12, 2018
@axic axic deleted the additional-keywords branch June 12, 2018 15:33
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