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

Fix commas being treated as using directives value separators & deprecate using them with whitespace #3333

Merged
merged 8 commits into from
Dec 5, 2024

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Nov 28, 2024

Fixes #3282

NOTE: these are breaking changes affecting using directives syntax.
It's technically a fix + deprecation, but it is not impossible for existing builds to break.

For example, where

//> using scala 2.13,3

Used to mean that Scala is set to 2.13 and 3 for cross-builds, it will now mean Scala is set to 2.13,3, which is not a valid version and will produce an error.
The valid syntax for the same would now be:

//> using scala 2.13 3

The fix itself is contained in the using_directives bump to 1.1.2:

Specifically, it's this change:

What this PR does:

  • bumps using_directives to 1.1.2
    • using commas (,) as separators without whitespace is no longer supported (the comma will now be treated as part of the value)
    • using commas (,) with a following whitespace as separator gets deprecated and will produce a warning
  • adds tests ensuring the old syntax is no longer honoured (no longer can use commas on their own as value separators)
  • adds tests for the deprecation of using commas with whitespace as value separators
  • updates the syntax in docs, old code & tests (which contributes the most to the change line count)
  • updates the publish setup and fix sub-commands to use the latest syntax

@Gedochao Gedochao force-pushed the update/using_directives-1.1.2 branch 3 times, most recently from 0fa4c34 to 1ae6722 Compare November 29, 2024 13:53
@Gedochao Gedochao force-pushed the update/using_directives-1.1.2 branch from 358244a to 1595b20 Compare December 2, 2024 14:18
@Gedochao Gedochao changed the title Update using_directives to 1.1.2 Fix commas being treated as using directives value separators & deprecate using them with whitespace Dec 2, 2024
@Gedochao Gedochao force-pushed the update/using_directives-1.1.2 branch 4 times, most recently from 6feb16b to 3a293e0 Compare December 4, 2024 11:38
…e separators on their own, and being deprecated otherwise
- get rid of unnecessary commas and double quote escapes
- bump versions where applicable
- misc typo fixes & tweaks
…: get rid of unnecessary commas and double quote escapes
- get rid of unnecessary commas and double quote escapes
- fix the `publish setup` sub-command to only add double quotes when a value contains whitespace chars
- fix the `fix` sub-command to only add double quotes when a value contains whitespace chars
@Gedochao Gedochao force-pushed the update/using_directives-1.1.2 branch from 3a293e0 to 21ff792 Compare December 4, 2024 13:13
@Gedochao Gedochao added the needs-minor-release This change should require a minor version bump. label Dec 4, 2024
@Gedochao Gedochao marked this pull request as ready for review December 4, 2024 15:24
Copy link
Member

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM!

@Gedochao Gedochao merged commit 1d7498e into VirtusLab:main Dec 5, 2024
77 checks passed
@Gedochao Gedochao deleted the update/using_directives-1.1.2 branch December 5, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-minor-release This change should require a minor version bump.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commas shouldn't be interpreted as directive value separators on their own
2 participants