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

Implement full records support #8267

Closed
nrmancuso opened this issue May 28, 2020 · 4 comments
Closed

Implement full records support #8267

nrmancuso opened this issue May 28, 2020 · 4 comments

Comments

@nrmancuso
Copy link
Member

nrmancuso commented May 28, 2020

Per discussion at #8023 (comment) and #8023 (comment). While a superficial implementation of Java 14 records will close Issue #8023, we need to make an issue for full records support, extending our support of records to build the full AST under the RECORD_DEF token.

Topics of discussion:

  1. Which checks should be extended to support records
  2. How to handle constructors. While a new compact constructor for records must be defined, records must also support canonical constructors with some restrictions (see JLS). Should this compact constructor be added to field grammar?
  3. New tokens to introduce. Per Allow unsupported syntax, like record classes #8023 (comment) we will be introducing RECORD_COMPONENT_DEF and RECORD_CTOR_DEF, is this all?
  4. ...

http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191031/specs/records-jls.html#jls-8.10.5

Group Chats:
messages1.pdf
messages2.pdf

@nrmancuso nrmancuso changed the title Full Record Implementation Implement full records support May 28, 2020
@pbludov
Copy link
Member

pbludov commented Jun 1, 2020

The checks to be reviewed:

  • All annotation checks, as RECORD_COMPONENT may be annotated
  • All type-specific checks, as records are another kind of type
  • Some whitespace checks, as {} (empty body) is common for records

@nrmancuso
Copy link
Member Author

The checks to be reviewed..

Thank you, I will make note of any insight for supporting these checks while I work on #8023.

@pbludov
Copy link
Member

pbludov commented Jun 10, 2020

From #8308

Adding new keywords to a language is very difficult, since they are probably used as identifiers in the existing code. Our parser should accept such keyword as an identifier, but we need a new check. Something like AvoidUsingKeywordsAsIdentifiers.

@esilkensen esilkensen added this to To do in Java 14 syntax features via automation Jun 17, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 8, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 8, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 8, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 8, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 8, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 9, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 26, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 27, 2020
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Jul 27, 2020
@rnveach
Copy link
Member

rnveach commented Jul 27, 2020

Fix was merged

@rnveach rnveach closed this as completed Jul 27, 2020
Java 14 syntax features automation moved this from To do to Done Jul 27, 2020
@rnveach rnveach added this to the 8.36 milestone Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

4 participants