-
-
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
Enable more win32 specs #8683
Enable more win32 specs #8683
Conversation
|
80b2b99
to
859e12a
Compare
src/http/common.cr
Outdated
raise "Can't decompress because `-D without_zlib` was passed at compile time" | ||
case encoding | ||
when "gzip" | ||
when "deflate" |
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.
Are you sure you don't mean when "gzip", "deflate"
?
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.
Thinking again, if this wasn't caught by the specs, it should have been. Can we have a spec?
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.
Actually, this is not trivial because this branch is based on a compiler flag. The test would need to compile a separate program with -Dwithout_zlib
for performing the HTTP parse. We don't have any specs for these flags at all yet. Given that they mostly comment out code and eventual replacements are usually very trivial, I'm not sure we should go that extra mile. Anyways, it should be discussed separately from this PR.
spec/std/string_spec.cr
Outdated
"こんいちは".reverse.should eq("はちいんこ") | ||
end | ||
|
||
it "reverses taking grapheme clusters into account" do | ||
pending_win32 "reverses taking grapheme clusters into account" do |
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.
Is this failing due to pcre not being compiled with unicode support on your system? I don't see why this spec should fail.
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.
Yes, but I'm pretty sure I've built it with UTF-8 support as described in the porting guide.
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.
How does it fail?
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.
support for \P, \p, and \X has not been compiled in Argument 1
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.
I think that -DPCRE_SUPPORT_UNICODE_PROPERTIES=On
needs to be used when compiling pcre for windows.
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.
The flag is already there
crystal/.github/workflows/win.yml
Line 77 in 37d6047
cmake . -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=OFF -DPCRE_SUPPORT_UNICODE_PROPERTIES=ON -DPCRE_SUPPORT_JIT=ON -DPCRE_STATIC_RUNTIME=ON |
oprypin@6a40de1
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.
Updated the wiki to match
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.
Awesome, so I just need to rebuild the library locally.
859e12a
to
7f75574
Compare
force pushes :( |
require "./headers" | ||
require "./content" | ||
require "./cookie" | ||
require "./formdata" |
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.
How about require "./**"
to make sure everything's required?
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.
That would break on windows.
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.
why?? I'd much much prefer you kept the requires the same and used skip_file
on anything that breaks.
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.
I'd like to avoid wildcard requires because it can lead to weird issues based on include-order. Writing a few explicit requires isn't bad IMO.
Sorry for the force pushes, but the changes were really insubstantial and this makes it easier to review for everyone who didn't take a look at it before. |
744b345
to
c7ddf57
Compare
c7ddf57
to
8b64ebd
Compare
Rebased on master with #8676, now the specs run on GitHub Actions:
|
Just dropped a few notes in the conversations above. |
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.
❤️
rebase time! |
25711ac
to
e2ee447
Compare
Rebased and squashed. |
Somehow win32 specs hang at some point. I've now added verbose option. Next step is to disable IO specs because that's where execution seems to stop. |
0432dc6
to
6f5fcba
Compare
ed677af
to
bf9e5b0
Compare
Followup on #8670. This PR enables a lot of more specs for building on win32.
Often just a few specs needed to be disabled in order to make the rest of a spec file compile and pass. This affects mostly specs working with big numbers or yaml.
All specs pass on win32.
With this and #8668 we should get 6464 examples passing on win32, that's 70% of all standard lib specs.