Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

This call to pretty_inspect causes Avram to not compile on Windows #1928

Closed
jwoertink opened this issue Nov 3, 2024 · 0 comments · Fixed by #1929
Closed

This call to pretty_inspect causes Avram to not compile on Windows #1928

jwoertink opened this issue Nov 3, 2024 · 0 comments · Fixed by #1929
Labels
bug windows Windows specific issue

Comments

@jwoertink
Copy link
Member

Expected subdomain matcher(s): #{@expected.pretty_inspect}

Specifically calling require "lucky" from this line https://github.com/luckyframework/avram/blob/b04ba2d4c130d6ddaf98069bfdedbf8a2b7b935a/src/lucky.cr#L1 will throw a compile error

In D:\a\_temp\crystal-latest-true-undefined\src\openssl\ssl\socket.cr:150:33

 150 | raise OpenSSL::SSL::Error.new(@ssl, bytes, "SSL_write")
                                 ^--
Error: Error: instance variable '@underlying_eof' of OpenSSL::SSL::Error must be Bool, not Nil
Error: Process completed with exit code 1.

This traces down to this line

In lib\lucky\src\lucky\errors.cr:252:54

 252 | Expected subdomain matcher(s): #{@expected.pretty_inspect}
                                                  ^-------------
Error: Error: instantiating '(Array(Regex | String) | Array(Regex) | Array(String) | Bool | Regex | String)#pretty_inspect()'

Removing the call to pretty_inspect "fixes" the issue and lets specs run on Avram... I haven't been able to reduce this outside of Avram. It's possible there's an issue somewhere else and this is a false positive, but for now I think we can just remove it until we can come up with a proper fix. It's most likely a Crystal bug on windows.

@jwoertink jwoertink added bug windows Windows specific issue labels Nov 3, 2024
jwoertink added a commit that referenced this issue Nov 3, 2024
…nformation to the error and it currently causes compilation errors on Windows. Fixes #1928
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug windows Windows specific issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant