-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 UUID.v1
, .v2
, .v3
, .v4
, .v5
#13693
Add UUID.v1
, .v2
, .v3
, .v4
, .v5
#13693
Conversation
1679849
to
9974c8a
Compare
9974c8a
to
bb0d62f
Compare
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.
✨
a626e5a
to
6bc0307
Compare
7610bd1
to
92403c6
Compare
92403c6
to
2c0dd16
Compare
Hi @threez please avoid force pushes, because that breaks the history of reviews and makes it harder for reviewers to re-review the work 🙏 |
benchmarks show, that for the regular use cases the native implementations yield better performance then the openssl variant crystal-lang#13691
Please use the |
only use native crypto as a fallback crystal-lang#13691
@straight-shoota I used the |
I suppose we should probably run the WASM specs with |
There are many use cases of UUIDs that don't involve the need to generate them via the two digests. IMO it is unacceptable to pull in OpenSSL stuffs from |
Hm, that's a good point. However, it's worth noting that this patch does not require OpenSSL explicitly. It just uses the stdlib APIs This situation is quite unsatisfactory, for sure. Maybe a good idea could be to refactor -require "openssl"
+require "openssl/digest" (We would want to do this as a separate change, though - not as part of this PR) |
The suggestion to minimize the digest dependency (☝️) has been implemented in #13818. I think that's a reasonable solution and I'd be happy to move on with this PR. @HertzDevil WDYT? The following patch should fix the breaking WASM job: --- i/.github/workflows/wasm32.yml
+++ w/.github/workflows/wasm32.yml
@@ -40,7 +40,7 @@ jobs:
rm wasm32-wasi-libs.tar.gz
- name: Build spec/wasm32_std_spec.cr
- run: bin/crystal build spec/wasm32_std_spec.cr -o wasm32_std_spec.wasm --target wasm32-wasi -Duse_pcre
+ run: bin/crystal build spec/wasm32_std_spec.cr -o wasm32_std_spec.wasm --target wasm32-wasi -Duse_pcre -Dwithout_opensssl
env:
CRYSTAL_LIBRARY_PATH: ${{ github.workspace }}/wasm32-wasi-libs |
@straight-shoota merged master and updated the wasm32 target so that openssl would not be compiled using your diff. |
this makes the build more generic and less specific to wasm Co-authored-by: Quinton Miller <nicetas.c@gmail.com>
UUID.v1
, .v2
, .v3
, .v4
, .v5
add missing uuid methods v1-v5
fixes #13691