-
-
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
Implemented #2770 #6306
Implemented #2770 #6306
Conversation
This actually breaks the build: |
…ed to a blank string
@asterite sorry habit :) |
What's interesting is that the error that I get here happens even when I take out all of the changes that I made. After moving the file back to before my initial commit, the same error persisted on my local machine (running |
@paulkass can you please paste the error you get when you run |
|
|
@RX14 error persists after running that. Can it be that that's because my computer does not support the x86_64 architecture? Also, the Travis CI build is failing but it's failing in the compiler, and I didn't touch the compiler at all so I don't know what that issue is all about. |
Re-run CI, now it passes. It was a hiccup. |
@paulkass I think Crystal is not compatible with LLVM 6 yet, only LLVM 5. |
oh nice! thanks @asterite! i guess i'll revert to an older version then. |
@paulcsmith Please don't set the default value of |
@asterite I'm kind of confused about this as we need to initialize |
But if you initialize it there, the compiler won't detect when you don't initialize it later. In one of the methods it's initialized from the method argument, so putting first an empty string and then overwriting it is not the best thing to do. It's a minor thing, but the way you did it originally was better. This can be merged as it is right now, but usually reviewers are more strict, I don't know why they are not in this particular case. |
@asterite I've played around a bit, and it seems like "casting" (adding a |
Casting? What do you mean? |
More like "casting". Instead of declaring |
Yes, that's similar but probably less clear. I'd go with a type declaration. |
Actually, a type declaration is better. If you use that cast, but in another method assign another type that the compiler can infer, it will result in a union. So please use a type declaration. |
Yeah, I don't think I know a way to get a type declaration without some sort of initialization somewhere (at the class level or |
@hostname : String That should work |
@asterite That gives me this error:
|
Exactly. Now to fix that initialize where hostname is not properly initialized ;-) |
@asterite I dug through the docs (again) and I found the |
It's just to keep a reference, so just make it nilable |
Oh, the hostname isn't always assigned? If so, an empty string is good. |
Or, yeah, it can be nilable. I'll review this in a few hours... |
Crystal supports LLVM 6 just fine, it just needs a single bugfix patch applied which arch linux has kindly done. Someone accidentally unexported a symbol in a refactor commit. I was expecting LLVM to release 6.0.1 but they haven't for some reason despite an obvious regression. Someone should do the same for homebrew.
|
I just checked this, and the current type of @paulkass Please use this type annotation: @hostname : String? |
@asterite alright there we go! |
oops sorry about closing this |
Implemented #2770.
Processed the hostname of the server in the OpenSSL Client with punycode to support non-ASCII characters in hostnames. I used punycode from #2543 and also used the same method he used for implementing this (
addrinfo.cr
).First PR, feel free to rip it apart :).