-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
std: json.parseFromValue() #15981
std: json.parseFromValue() #15981
Conversation
@matu3ba are you game to add these to compiler-rt?
|
Can do. I wonder though, why I am unable to find search results to the ppc runtime abi functions and the only results are inside libgcc __fixkfti. This looks like libgcc doing their own abi thing without documenting it or PPC(64) docs being aweful to search. Those two are used as PPC64 aliases: __fixkfti, __floattikf here. TODO for docs: add assumptions about long double being 128IEEE (-mabi=ibmlongdouble -mlong-double-128) instead of spaghetti code https://developers.redhat.com/articles/2023/05/16/benefits-fedora-38-long-double-transition-ppc64le#how_to_transition_to_ieee_128_bit_long_double UPDATE: Tracking issue for PPC is #16057. I'll fill status and make the tracking issue more readable in the next days. |
@thejoshwolfe Can you rebase on top of
|
@matu3ba you can test locally. Run the std lib tests with the appropriate -target parameter and then run with QEMU. |
2d63972
to
0669bef
Compare
0499df2
to
e9f0195
Compare
@matu3ba the names are still not correct on powerpc64le-linux-musl and powerpc-linux-musl.
|
0669bef
to
b934176
Compare
e9f0195
to
27a0fbb
Compare
First of all, sorry for the inconvenience. I should have waited the full libstd test suite. It would be very nice, if there would be a target filter to speed things up (prompt also showed up arm stuff). But I should have used Also, reminder to myself: Dont do PRs at 2am and wait for CI/test suite. I suspect LLVM does not use UPDATE:
I'll run the complete test suite run over night locally. |
b934176
to
b6b6a90
Compare
27a0fbb
to
3cc2297
Compare
I'm going to see if I can get the CI to pass even if I have to leave the one test behind. Enabling the test can turn into its own PR, but I'd like to get the features in this PR merged in time for 0.11. |
c1815dc
to
d1767e7
Compare
lib/std/json/dynamic_test.zig
Outdated
try testing.expect(tree.div.color == .blue); | ||
try testing.expectEqualStrings("Cancel", tree.div.children[1].button.caption); | ||
} | ||
// TODO: getting a strange linker error with this test. |
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.
In master branch, all disabled tests must have a corresponding open issue. If you wish to commit this disabled test, please open a corresponding issue for it and omit the word "TODO" from the comment (#363).
Also, there is a preferred way to disable tests which is to return error.SkipZigTest
inside the test, rather than commenting out the code.
Also, I believe this issue is actually fixed in master branch. I suggest to wait until #16089 lands and then rebase your PR with the tests enabled.
Final request, after tests are passing, please clean up the commits in this PR that enable/disable tests in ways that no longer matter since master branch has fixes.
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.
PTAL
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.
Looks good
c83c7d2
to
a5f9f8d
Compare
008da65
to
6cf6458
Compare
This reverts commit c83c7d2.
6cf6458
to
ef0b419
Compare
The function doesn't seem to be reachable via Lines 85 to 91 in 9d66481
|
Oops! Good catch. Fixed in #16194 |
To support this case: #15705 (comment)
Adding a
parseFromValue()
including a custom parse function means that we can parse complex json documents with polymorphic objects by using custom code to determine which union item things should be. Seetest "polymorphic parsing"
for an example.