-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
x.json2: replace x.json2.decode() with x.json2.decoder2.decode() #25472
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
Conversation
|
Connected to Huly®: V_0.6-26156 |
|
Ah that's an issue, now that the deprecation is working it's giving errors in all those cases. |
|
Rip 'em out. @spytheman does it manually, occasionally - we don't have automation to remove completely deprecated things. |
|
I will rip it out and just add it to this pr then. |
|
|
|
Potentially could move decoder2 up a directory to json2 (since the tooling also depends on it). |
|
Separate PR. Only change what's needed for the intent of the PR each time. Keeps them smaller, as well as making them quicker/easier to review. Moving those up a level will definitely deserve a separate PR. You have to move the current files up, create "stub" files that give a deprecation message, and import the files that were moved, etc., etc. |
|
Imho it should always require the deprecated tag, because of the message; using just |
use a far future deprecation date or a date in the past, depending on what you need to test |
|
There is a script |
|
I think that this PR should be split - the parser change and a test for it should be 1, and the json changes should be an entirely separate PR (potentially first to be merged). |
yes, 100% |
|
@Larsimusrex what do you think about the x.json2 changes? |
|
So it just removes |
Yes I can do the json changes in a seperate pr but they will have to be merged first (as the json decode function is a hard error).
I think the best thing would be to replace What I will do for now is remove the Edit: opened a seperate pr for |
f6de01e to
d2c17d7
Compare
|
Docs CI is failing because of a bug in decoder2: Will open an issue. |
|
IMHO, in this case, just replacing it is much better |
Yeah that's what I'm going ahead and doing right now as it seemed the most sensible option. |
|
The stub module isn't in the spirit of deprecations... a (possibly?) better way would be to make that module import json2 itself, then call the functions from there, instead of returning an error. Just returning an error breaks compiles as badly as removing routines directly. Also, it might be good to choose a new deprecation date (as in today), since nobody has been notified about the previous date before, and it is already past the date where those deprecations would change from warnings to errors - another hard break in compiles. |
e534398 to
06e9c0d
Compare
f6f80e7 to
8e90c1c
Compare
|
Will wait for #25489 as this should fix the docs CI and then I can update the test in there to use the updated decoder2. |
5b484f2 to
b4a2fab
Compare
|
Rebased, CI should pass now. |
|
@dy-tea thank you 🙇🏻 |
|
|
||
| @[deprecated: '`decode` has been moved to `x.json2`, use `decode` from `x.json2` instead'] | ||
| @[deprecated_after: '2025-10-12'] | ||
| fn decode[T](val string) !T { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no need to deprecate a non pub function (since people were not able to depend on it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's right.
| } | ||
|
|
||
| @[deprecated: '`decode` has been moved to `x.json2`, use `decode` from `x.json2` instead'] | ||
| @[deprecated_after: '2025-03-18'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the date here be 2025-03-18 or the current one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it was deprecated earlier, I just moved it to stub.v
Original pr with
@[deprecated_after]moved to #25480