Skip to content

Commit

Permalink
Use lib crates from crates.io
Browse files Browse the repository at this point in the history
See lib/README.md for justification
  • Loading branch information
davidlattimore committed Jun 21, 2023
1 parent 2d64a0a commit 5c8d1a4
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 12 deletions.
44 changes: 36 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ debug = 0
# chalk-ir = { path = "../chalk/chalk-ir" }
# chalk-recursive = { path = "../chalk/chalk-recursive" }
# chalk-derive = { path = "../chalk/chalk-derive" }
# line-index = { path = "lib/line-index" }
# la-arena = { path = "lib/la-arena" }
# lsp-server = { path = "lib/lsp-server" }


# ungrammar = { path = "../ungrammar" }

Expand Down Expand Up @@ -76,10 +80,10 @@ tt = { path = "./crates/tt", version = "0.0.0" }
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
vfs = { path = "./crates/vfs", version = "0.0.0" }

# In-tree crates that are published separately and follow semver.
line-index = { version = "0.1.0-pre.1", path = "lib/line-index" }
la-arena = { version = "0.3.1", path = "lib/la-arena" }
lsp-server = { version = "0.7.1", path = "lib/lsp-server" }
# In-tree crates that are published separately and follow semver. See lib/README.md
line-index = { version = "0.1.0-pre.1" }
la-arena = { version = "0.3.1" }
lsp-server = { version = "0.7.1" }

# non-local crates
smallvec = { version = "1.10.0", features = [
Expand Down
9 changes: 9 additions & 0 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@
Crates in this directory are published to [crates.io](https://crates.io) and obey semver.

They _could_ live in a separate repo, but we want to experiment with a monorepo setup.

We use these crates from crates.io, not the local copies because we want to ensure that
rust-analyzer works with the versions that are published. This means if you add a new API to these
crates, you need to release a new version to crates.io before you can use that API in rust-analyzer.

To release new versions of these packages, change their version in Cargo.toml. Once your PR is merged into master a workflow will automatically publish the new version to crates.io.

While prototyping, the local versions can be used by uncommenting the relevant lines in the
`[patch.'crates-io']` section in Cargo.toml

0 comments on commit 5c8d1a4

Please sign in to comment.