Skip to content

Allow tools-versions to be specified later in the manifest#7201

Merged
neonichu merged 1 commit into
mainfrom
allow-tools-version-specification-later-in-manifests
Jan 10, 2024
Merged

Allow tools-versions to be specified later in the manifest#7201
neonichu merged 1 commit into
mainfrom
allow-tools-version-specification-later-in-manifests

Conversation

@neonichu

Copy link
Copy Markdown
Contributor

It doesn't seem particularly necessary to require tools-versions to be specified in the first line of the manifest, e.g. users may want to write comments at the top of the file. This changes the parsing to look at all lines of the manifest subsequently in case of errors. If no tools-version is found in the entire file, the original error as determined by the first line will be thrown. If a tools-version specification is found, but is for a version prior to 5.11, a specific error message is thrown to avoid users to write backwards-incompatible manifests when using 5.11.

rdar://118484544

It doesn't seem particularly necessary to require tools-versions to be specified in the first line of the manifest, e.g. users may want to write comments at the top of the file. This changes the parsing to look at all lines of the manifest subsequently in case of errors. If no tools-version is found in the entire file, the original error as determined by the first line will be thrown. If a tools-version specification is found, but is for a version prior to 5.11, a specific error message is thrown to avoid users to write backwards-incompatible manifests when using 5.11.

rdar://118484544
@neonichu

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@neonichu

Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

@neonichu

Copy link
Copy Markdown
Contributor Author

@swift-ci please test windows

@neonichu neonichu self-assigned this Dec 14, 2023
@neonichu

Copy link
Copy Markdown
Contributor Author

I don't think this actually needs to go into the changelog, this isn't supposed to be a new feature per-se but rather a usability improvement for the people who happened to put their tools-version declaration in the wrong place.

@neonichu neonichu merged commit 5e2f72f into main Jan 10, 2024
@neonichu neonichu deleted the allow-tools-version-specification-later-in-manifests branch January 10, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants