X Tutup
Skip to content

Core: Remove skip_cr argument from String#110867

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo:core/deprecate-skip-cr
Sep 28, 2025
Merged

Core: Remove skip_cr argument from String#110867
Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo:core/deprecate-skip-cr

Conversation

@Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Sep 24, 2025

In a recent core meeting, we discussed removing the p_skip_cr argument from the String contructors because something that specific shouldn't be tied to something so general. This ended up being a bit more involved than I expected, as this argument also applied to a FileAccess function, which also needed to be removed. Consequently, the get_line() function had to be expanded to account for \r line endings, and the tests were adjusted to accomodate that

@Repiteo Repiteo added this to the 4.x milestone Sep 24, 2025
@Repiteo Repiteo requested review from a team as code owners September 24, 2025 19:21
@Repiteo Repiteo requested review from a team as code owners September 24, 2025 19:21
@Repiteo Repiteo force-pushed the core/deprecate-skip-cr branch from b1bcdfd to 8528fdd Compare September 24, 2025 19:23
@Repiteo Repiteo force-pushed the core/deprecate-skip-cr branch from 8528fdd to 687d035 Compare September 25, 2025 23:06
@Mickeon
Copy link
Member

Mickeon commented Sep 26, 2025

Maybe I'm wrong but the PR's title is a bit of a misnomer? "Deprecation" would somewhat implies the parameter is still available but superfluous. Instead it has been removed entirely.

@Repiteo Repiteo force-pushed the core/deprecate-skip-cr branch 2 times, most recently from e7ab52b to cb94b7d Compare September 26, 2025 18:42
@Repiteo Repiteo changed the title Core: Deprecate skip_cr argument Core: Remove skip_cr argument from String Sep 26, 2025
@Repiteo
Copy link
Contributor Author

Repiteo commented Sep 26, 2025

Maybe I'm wrong but the PR's title is a bit of a misnomer? "Deprecation" would somewhat implies the parameter is still available but superfluous. Instead it has been removed entirely.

Ahh right, that would be correct. I did add a compat method for a function which took in skip_cr, but that shouldn't imply every instance was deprecated

Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

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

Makes sense to me! Line endings are not a property of the encoding, so the parameter was misplaced.

@Repiteo Repiteo force-pushed the core/deprecate-skip-cr branch from cb94b7d to 90e2cda Compare September 27, 2025 17:17
Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

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

I really hope we don't have many users who make use of the p_skip_cr option. If we do, we'll have to consider reverting this PR.

However again, in principle, I wouldn't expect the encoding function to handle line endings, so this should be a step in the right direction.

@Repiteo Repiteo force-pushed the core/deprecate-skip-cr branch from 90e2cda to ceb2e21 Compare September 27, 2025 17:45
@Repiteo Repiteo modified the milestones: 4.x, 4.6 Sep 27, 2025
Copy link
Member

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

This gets a personal approval from me because, even just by reading the documentation during localization, I thought it was really, really weird to have this parameter.

@Repiteo Repiteo force-pushed the core/deprecate-skip-cr branch from ceb2e21 to 1f64d1e Compare September 27, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

X Tutup