Update to pure V json2 module#78
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64108e85af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@squidink7 Alex has now fixed and merged the escaped-key decoding issue in json2: vlang/v#27815 Please update V first. To finish this PR, the cleanest option is to track the latest V version, keep import json2, update the V 0.5.1 smoke workflow, add a small GUI regression test for escaped locale/theme keys, then resolve both Codex review threads. Thanks! :) |
|
I've added a test, however I'm not familiar with github workflows. Would I just change the |
|
Not quite. :) Simply changing Please reuse the latest-V Windows setup already present in The test you added is close, but it must use a raw V string. Otherwise V converts the Unicode escapes before content := r'{"n\u0061me":"esc\u0061ped"}'Please also add the locale regression case requested by Codex in content := r'{"str\u0069ngs":{"o\u006b":"OK"}}'Then parse it and verify: assert loc.str_ok == 'OK'Finally, run Thanks sir! :) |
|
Thanks for the feedback! I was wondering if I needed to do something like double escape the string. |
|
Thanks. I noticed one issue in my previous suggestion: "OK" is already the default fallback value, so that assertion cannot prove the escaped key was decoded. That was my mistake. Please use a distinct value such as "ESCAPED_OK_78" in both the JSON and the assertion. The latest-V Windows smoke setup looks correct. Since this workflow is manual, please open the "Windows Native Smoke" workflow in your fork, click "Run workflow", select the json2 branch, and leave the default options for the first run or run:
Once that smoke and the normal PR CI are green, you can resolve the remaining Codex review thread and let me know. :) |
|
Whenever I try to do anything with the GitHub cli it responds with this message: After a few tries I managed to eventually login but running the workflow does that too. Though something must have happened because I got an email saying the NodeJS version is out of date? I didn't think we used Node... GitHub is weird. |
|
The workflow was actually dispatched, so the 503 was only transient. I checked the run. The Node.js warning comes from GitHub's actions/cache action. The actual failure is the restored vglyph cache. It contains an older checkout with local Git commits, so v install vglyph correctly refuses to overwrite it. The workflow needs a small cache-handling fix before the Windows smoke can reach the actual tests. |
|
I see, what would be the best approach to fix this? |
|
The cleanest fix is to reuse the vglyph cache pipeline already present in In
You can copy those four steps directly from |
|
Thanks! The regular CI is green now. I’m just waiting for your feedback after rerunning the Windows Native Smoke workflow on the latest commit. :) |
|
The windows smoke test passed :) |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
jsonis deprecated, replaced byjson2in the latest version of VThis requires tracking V master which means some of the actions need to be updated.