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
wrappersproject is not part of the workspace. This has a few drawbacks:rust-analyzeror 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.targetfolders in each project. If two projects depend upon a single dependency, its artefacts will be copied to eachtargetfolder separately, increasing disc usage.What is the new behavior?
The
wrappersproject 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.tomlwas moved to.cargo/config.tomlas mentioned in thepgrxdocs about moving to a workspace.wrappers,supabase-wrappersandsupabase-wrappers-macrosare part of the workspace in the top levelCargo.toml. In addition, the top levelCargo.tomlcontains the profiles now, fixing the profiles warning."rust-analyzer.cargo.features": ["all_fdws,helloworld_fdw"]in.vscode/settings.jsonto makerust-analyzerin VSCode recognize all rust files inwrappers/src/fdwfolder as part of the workspace.wrappersto crates.io, apublish = falseline is added to itsCargo.tomlfile.targetdirectory rather than inwrappers/target.Additional Context
I also had to pin theEdit:clickhouse-rsto a specific commit in theCargo.tomldepdencies because of its accidental upgrade when addingwrappersto the workspace.clickhouse-rsdependency is already pinned to a specific revision in the main branch which is merged in this PR's branch.