Skip to content
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

Add devbox config #2274

Closed
wants to merge 9 commits into from
Closed

Add devbox config #2274

wants to merge 9 commits into from

Conversation

seven1m
Copy link
Member

@seven1m seven1m commented Oct 26, 2024

I've been using Devbox for some other projects and I wanted to see if using it here could simplify the setup process for new devs.

TODO: there are few failing specs (when run within a devbox shell) I need to figure out.

  • ::crypt() gives EINVAL
  • spec/core/file/flock_spec.rb segfault
  • spec/core/io/write_spec.rb Errno::ENOENT

src/string_object.cpp Outdated Show resolved Hide resolved
In my devbox environment, this is failing. Need to figure out why...
I learned that libcrypt is deprecated, and libxcrypt is a suitable
replacement. Yet, libxcrypt has certain unsecure algorithms disabled,
which we need to pass ruby specs.

Rather than using libcrypt or libxcrypt, let's copy over the crypt.h and
crypt.c from Ruby.
@seven1m seven1m closed this Nov 11, 2024
@herwinw herwinw deleted the devbox branch November 11, 2024 15:55
@seven1m seven1m restored the devbox branch November 16, 2024 14:32
@seven1m seven1m reopened this Nov 18, 2024
@seven1m
Copy link
Member Author

seven1m commented Nov 18, 2024

I'm closing this agian.

There were two issues:

  1. Clang compiled for Nix is just too slow. From my limited understanding, it's due to reproducibility -- certain optimizations are disabled. On my machine, the command clang++ -pthread -g -Wall -Wextra -Werror -Wunused-result -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused -value -Wno-unknown-warning-option -Wno-trigraphs -Wno-vla-cxx-extension -DNAT_GC_GUARD -fPIC -I /home/tim/pp/natalie/include -I /home/tim/pp/natalie/ext/tm/include -I /home/tim/pp/natalie/ext/minicoro -I /home/ tim/pp/natalie/build -I /home/tim/pp/natalie/build/onigmo/include -I /home/tim/pp/natalie/build/prism/include -std=c++17 -DNAT_OBJECT_FILE -shared -fPIC -rdynamic -Wl,-undefined,dynamic_lookup -o build/libnat.s o build/libnat.rb.cpp build/libnatalie.a (part of our build) goes from 32 seconds to 2:53. The test suite takes 4-5x longer to run. It's painful. GCC is even worse... I didn't even measure it.
  2. There is a bug in our GC exposed by these versions of Clang and GCC. I'll file that separately... [edit: GC bug: Args values are getting collected prematurely #2345]

There is some good work in this PR that I plan to ship as separate PRs, just without the devbox config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants