-
Notifications
You must be signed in to change notification settings - Fork 27
Add cpp test, fix locale issues and fix CI issues #37
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
Use `xargs` to build the `ar` command line instead of running `ar` manually to reduce startup costs. Build the symbol table after adding each file instead of continually rebuilding it.
@lloeki -
I just noticed that full-icu is referenced in the build-libv8 script. I assume you have a bit of context here @lloeki ? |
I have also confirmed that the issue does not reproduce in the built node executable |
Managed to figure out what's going on with the crashing... turns out the monolith build script was including The compiler apparently found that object first when building dependent programs, so we were getting literally zero ICU data, which V8 isn't set up to handle. Dropping the I will note that the extra |
Something I just noticed: d742196 and 5cb6e87 conflict with 0edfea9 on master (from #31). For the former, that's not a huge problem, it's basically a subset of the conflicting commit (though not quite because I pass |
Thanks for the investigation! That As for the conflicts, let's fix |
I'm taking @Fayti1703 's test code and putting it into the test framework now. It should pass as a first case added. Additional new cases can be added easily afterwards. Then we can get back to 'the task at hand' of upgrading node/v8. :) |
As for the real real fix for the root cause, I presume it would entail having a true |
I think it's not that bad. Adding a few line continuations and indents in the Can add those changes to this PR if you're interested, @lloeki. |
Yeah, that would be the ideal solution... though we might be able to parse out the object files that are being linked into the Plus, it looks like v8 is already bundled into a couple |
Nah, don't sweat it, it was in jest regarding the stuff I need to get back to someday. Let's keep it simple, this is good enough to get us out of this hole.
IIRC I tried that a long time ago but it was not sufficient. |
Got some first attempts at stuff in there. Am working on linux/darwin conditional linking now. Then onto actions integration. |
Hey @lloeki - I found this in the readme
These files don't seem to exist-- did they move or something? I feel like we should throw a few things in here for our future selves. |
@lloeki Looks like the workflows file does not use the makefile at the top level at all- is that intentional? I'm trying to figure out where to put the ctest build and run commands, and it looks like maybe the libexec script files, but they are kind of mixed? |
9f41537
to
7849fff
Compare
Not sure why my actions are not showing up in the checks tab, but they are showing up over here for those who are curious: |
That tab is for actions on a PR in the base repository (i.e. |
Strange though- I thought |
Quick update here: The state at 0f1dc90
In any case, I would like to do a cleanup pass over the commits prior to merging them in, though I think it's best to defer that to after we have an acceptable resulting tree. I'll let @lloeki be the judge of when we're at that point. |
test/gtest/CMakeLists.txt
Outdated
) | ||
|
||
string(TOLOWER ${CMAKE_SYSTEM_NAME} system_name) | ||
# FIXME?: Pure Windows will error on the following command. |
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.
Windows is not in our support matrix anywhere
https://github.com/rubyjs/libv8-node#do-i-get-a-binary
Hmm, not sure. Maybe I forgot to add these. Feel free to fill some stuff in if you're keen on it! A separate PR from this one would be good. |
Yeah, kind of.
So there are three "high level" build "orchestrators" currently:
I plan to unify and simplify these, hence my unpublished attempt to have |
Hmm, good question. I don't think this should be published in the gem, so I would refrain from having it in (excluding the latter because e.g I don't want people to need cmake when installing from source) |
Hey @lloeki We are very close to ready here. Additionally, do you know what is breaking the mini_racer test portions of the ci? |
and one that supports the newer cmake.
Alpine Linux's `ar` program doesn't support having objects with the same name in the archive twice, so we have to use the GNU extension for including paths. This commit *should* honestly be split into multiple separate commits, but unfortunately pretty much all of these changes have to be applied as a unit or a build step fails.
(force-pushed without any changes to the resulting tree to clean up the history a bit) |
This last commit! NICE @Fayti1703! We are VERY green. @lloeki @SamSaffron Please take a look. |
Amazing ... give it is all green lets merge this. What are the next steps we need here to publish a new version? Super keen to publish a new mini_racer |
@SamSaffron since mini_racer version constraint on The typical libv8-node release process (that I should document) is:
(Most of these can be automated via GH workflows, e.g tag => create GH release + attack artifacts + push to rubygems†. or it can be a manual GH "dispatch workflow") † this one can also both require and wait for 2FA with some interesting techniques The degraded libv8-node release process is the same, except (when CI is broken because reasons outside of release blockers):
|
That said, the plan to update node major now should be:
Then:
|
I'd be willing to rebase the changes here onto the |
@Fayti1703 has created the rebase, and we are working on test stabilization now: |
FYI I'm working on getting a 16.19.0.0 gem release out. |
Duh I was confused, it's going to be 16.19.0.1 not 16.10.0.1. It's a bug fix from the tentative 16.19.0.0 I pushed but is not used yet by mini_racer. Once pushed I'll open a PR for that version bump in mini_racer. |
Got CI fully green on the For a proper release CI is still missing
I'll assess which one would be the quickest and do that. Then I can do the release. |
Another option would be to build a cross-compiled aarch64 musl-libc and using the gcc-wrapper from that on a Debian container... though I don't know how complicated that would be to set up in CI. |
That's a valid option although it's trumped by going the clang route (whether with a Debian base + musl sysroot or with Alpine) which is much easier to handle. |
Going clang may also enable libc/libc++ independent builds, see here for some of this "portable" stuff: https://github.com/DataDog/libddwaf/tree/9caeac92a11ee7d43bf5d0d1453723409ac30f3f/docker/libddwaf#portable-libddwaf-on-any-linux-26 |
Fixes rubyjs/mini_racer#259
Unblocks rubyjs/mini_racer#271 and rubyjs/mini_racer#261
Also adds first c++ test.
Fixes #40