fix: make wrappers project part of workspace #143
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
A change to how the project is organized.
What is the current behavior?
The
wrappers
project is not part of the workspace. This has a few drawbacks:rust-analyzer
or IntelliJ IDEA Rust plugin don't work if the project root is opened in them. For example, I can't go to definition across projects.target
folders in each project. If two projects depend upon a single dependency, its artefacts will be copied to eachtarget
folder separately, increasing disc usage.What is the new behavior?
The
wrappers
project is part of the workspace. This fixes the above drawbacks and makes the project work with IDEs, with less disc usage and easier cargo usage during development and in GH actions.Following changes were done as part of this:
wrappers/.cargo/config.toml
was moved to.cargo/config.toml
as mentioned in thepgrx
docs about moving to a workspace.wrappers
,supabase-wrappers
andsupabase-wrappers-macros
are part of the workspace in the top levelCargo.toml
. In addition, the top levelCargo.toml
contains the profiles now, fixing the profiles warning."rust-analyzer.cargo.features": ["all_fdws,helloworld_fdw"]
in.vscode/settings.json
to makerust-analyzer
in VSCode recognize all rust files inwrappers/src/fdw
folder as part of the workspace.wrappers
to crates.io, apublish = false
line is added to itsCargo.toml
file.target
directory rather than inwrappers/target
.Additional Context
I also had to pin theEdit:clickhouse-rs
to a specific commit in theCargo.toml
depdencies because of its accidental upgrade when addingwrappers
to the workspace.clickhouse-rs
dependency is already pinned to a specific revision in the main branch which is merged in this PR's branch.