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

editorconfig/editorconfig#429 Remove section name, key and value length limits #21

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

goodhoko
Copy link
Contributor

  • Remove the upper limit for section name, key and value length.
  • Permit implementations to define their own upper limits.
  • Add minimum supported lengths each implementation must support.

@goodhoko
Copy link
Contributor Author

One thing that confuses me is the spec verioning. In the spec it says the version is tagged in this repository, however there're no tags nor releases in this repo. (There're howeever, in the core-tests repo.)

Copy link

@ppalaga ppalaga left a comment

Choose a reason for hiding this comment

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

Thanks @goodhoko, looks good. I have added a couple of minor suggestions inline.

index.rst Outdated Show resolved Hide resolved
index.rst Outdated Show resolved Hide resolved
index.rst Outdated Show resolved Hide resolved
index.rst Outdated Show resolved Hide resolved
@cxw42
Copy link
Member

cxw42 commented May 22, 2020

One thing that confuses me is the spec verioning. In the spec it says the version is tagged in this repository, however there're no tags nor releases in this repo. (There're howeever, in the core-tests repo.)

Your confusion is understandable! We are in the middle of changing the versioning of the specification.

Copy link
Member

@cxw42 cxw42 left a comment

Choose a reason for hiding this comment

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

Looks good - thanks! Two requests for clarification.

index.rst Outdated
@@ -131,8 +131,8 @@ special characters for wildcard matching:
The backslash character (``\\``) can be used to escape a character so it is
not interpreted as a special character.

The maximum length of a section name is 4096 characters. All sections
exceeding this limit are ignored.
Cores must accept section names with length up to 1024 characters.
Copy link
Member

Choose a reason for hiding this comment

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

Request: "up to and including 1024". That reduces the chance of an off-by-one error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch! Fixed. Thanks. .)

index.rst Outdated
of a pair value is 255 characters. Any key or value beyond these limits
shall be ignored.

Cores must accept keys and values with lengths up to 1024 and 4096 characters respectively.
Copy link
Member

Choose a reason for hiding this comment

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

Same - "up to and including"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed too

…th limits

- Remove the upper limit for section name, key and value length.
- Permit implementations to define their own upper limits.
- Add minimum supported lengths each implementation must support.
@goodhoko goodhoko force-pushed the feature/remove-length-limits branch from 536dfd6 to ba8493a Compare May 22, 2020 13:04
Copy link
Member

@cxw42 cxw42 left a comment

Choose a reason for hiding this comment

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

I think this PR is ready for a vote. Edit However, based on editorconfig/editorconfig-core-test#41 (comment) , I think it might be worth also expressly stating in the specification that the section name does not include the [ and ]. What do you think?

Note: corresponding core-test PR is at editorconfig/editorconfig-core-test#41

Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

Huge +1 on opening this up. Several real world implementations already exceed these maximums.

@xuhdev
Copy link
Member

xuhdev commented Jul 7, 2020

@cxw42 I agree it's better to clarify. Since clarifying [ and ] do not count as part of section name length is not a change of actual substance in the format but just a clarification, IMO a PR and proper review should be sufficient (i.e., no vote needed).

@cxw42
Copy link
Member

cxw42 commented Jul 19, 2020

@xuhdev I think we are ready for a vote on the heart of this proposal, which is changing the required lengths that cores must support. However, if you think the comments on this PR are sufficient, it's OK with me!

@xuhdev
Copy link
Member

xuhdev commented Jul 20, 2020

@cxw42 I'm a bit confused about what you are referring here. Are we going to vote on clarifying the limit or removing the limit?

@cxw42
Copy link
Member

cxw42 commented Dec 4, 2020

@xuhdev voting on whether to merge this PR. Are the approvals here enough that it does not need a full vote?

@cxw42
Copy link
Member

cxw42 commented Dec 7, 2020

Vote open at editorconfig/editorconfig-vote#13

@xuhdev
Copy link
Member

xuhdev commented Dec 7, 2020

Seems like we would have another followup vote later: does removing limit mean we'll count everything or do some truncation?

@xuhdev
Copy link
Member

xuhdev commented Dec 22, 2020

I think I got it: we used to do truncation but now:

Beyond that, each implementation may choose to define its own upper limit or no explicit upper limit at all.

@xuhdev
Copy link
Member

xuhdev commented Dec 22, 2020

@cxw42 @ppalaga @Mpdreamz Shall we merge this? My only comment is an aesthetic one: the PR seems to have every line longer than the rest of the document.

@cxw42
Copy link
Member

cxw42 commented Dec 23, 2020

LGTM

@xuhdev xuhdev merged commit 31e9431 into editorconfig:master Dec 23, 2020
@xuhdev
Copy link
Member

xuhdev commented Dec 23, 2020

Merged now. Thanks!

@goodhoko
Copy link
Contributor Author

goodhoko commented Dec 28, 2020

@xuhdev @cxw42 Thanks! Are there any additional release tasks to be done? Like tagging the commit and updating the website. .)

@xuhdev
Copy link
Member

xuhdev commented Dec 28, 2020

@goodhoko I don't think there's anything more to be done for this update, because the spec is mostly for developers not for end users. The spec page has been updated: https://editorconfig-specification.readthedocs.io/en/latest/

@goodhoko
Copy link
Contributor Author

@xuhdev Alright. I got confused (again) by the versioning section of the spec.

@cxw42 It was more than half a year since you wrote:

Your confusion is understandable! We are in the middle of changing the versioning of the specification.

Has nothing changed since then? .) If not, I guess we can really call this done. .)

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.

None yet

5 participants