-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
vlib: add port() for net.Addr #21412
Conversation
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.
Run v fmt -w
on this file.
no difference after do this |
@Delta456 it looks |
The only 2 failed checks were |
I think, that it will need rebasing over current master for all CI checks to pass. The most likely reason for it to fail like that with:
... even though that commit is present on master, is that We would have to correct bootstrapping_ci.yml so that it is more reliable, however that is an unrelated change, and in the meantime, rebasing with @ttytm what do you think? |
That It may be just due to hitting some limit, which unfortunately does not seem to be documented. I'll test manually the PR on a FreeBSD vps. |
@ttytm, about the bootstrapping CI, what do you think of changing it to fetch an older master commit, say 20 or 30 commits older than the current head? We do merge 10 commits per day relatively frequently, but very rarely over 12. If it checkouts a commit that is over 30 steps removed from the present, I think it will minimize the chance of similar failures (and people that work for several days before making their PRs usually already do rebase or merge before that). |
As expected, tests on FreeBSD do pass (except for |
@vcker everything looks good to me. Can you please just add a small test for the new method in fn test_ip_port() {
assert new_ip(1234, addr_ip_any).port()! == 1234
assert new_ip6(1234, addr_ip6_any).port()! == 1234
} before doing |
Already addressed here: #21414. So running into this issue should not happen anymore. |
If re-running doesn't solve this, it shouldn't happen anymore after a rebase. New PRs should be free of this. |
Excellent. Thank you. |
a17cde9
to
f0cc225
Compare
The bootstrapping CI passed, and the Cirrus FreeBSD job also passed after the rebasing. Imho it is good to merge. |
When I start write a reverse proxy for my android / ios app, I need a port that is always available, so I set address
':0'
, then I try to obtain port that automatically assigned, but i can't find a function likea.port()
. Although I can parse the address to get the port, but this is inelegant, so i add function.port()
.