-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
internal: Make line-index a lib, use nohash_hasher #14733
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.
one more small thing
@bors delegate+ |
✌️ @azdavis can now approve this pull request |
Sorry, for a somewhat nitpicky review, but I do think it's important that stuff in lib is kept to much higher standard wrt to public APIs than other stuff. As a general rule of thumb, it should never happen that we just move stuff from crates to libs. If we do that, that means one of the following:
|
no problem, I get that the standard for public libs should be higher. |
As well as doing the shrink_to_fit, we also don't have to keep track of the capacity anymore.
@bors r+ |
☀️ Test successful - checks-actions |
thanks! could we publish the libs to crates.io? it seems like https://github.com/rust-lang/rust-analyzer/blob/master/.github/workflows/publish-libs.yaml would do it but it runs on pushes to main only (this repo's default branch is not main but master). it also runs on "workflow_dispatch", i'm assuming that's a manual trigger? |
Fix libs publish branch filter line-index didn't actually get published from #14733, probably because the branch filter was for main but the main branch is called master here. This fixes the workflow file I also tweaked the libs readme mostly just so the paths filter would pick up the changes.
This PR seems to cause panics in r-a now #14792 |
I think the only logic we changed/added are the extra checks to make sure the offset is valid (bounds checks and checking if it’s inside a multi byte character); maybe we could back out those changes until we know more. |
These seem like they are not specific to rust-analyzer and could be pulled out to their own libraries. So I did.
azdavis/millet#31