{{ message }}
Avoid having protocol-ws build of surrealdb depend on surrealdb-core#7281
Draft
nresare wants to merge 5 commits intosurrealdb:mainfrom
Draft
Avoid having protocol-ws build of surrealdb depend on surrealdb-core#7281nresare wants to merge 5 commits intosurrealdb:mainfrom
nresare wants to merge 5 commits intosurrealdb:mainfrom
Conversation
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Please note that this is more of a proof-of-concept than change that is ready to land as-is. Feel free to re-shape this however you see fit. I mostly wanted to show that it is possible.
What is the motivation?
When building the surrealdb crate with features
protocol-wsand/orprotocol-httponly a tiny piece ofsurrealdb-coreis actually used. This PR moves the needed pieces ofsurrealdb-coreinto a new cratesurrealdb-client-coreand makessurrealdb-coredepend on the new crate.This speeds up analysis and build any rust project that uses the surrealdb sdk to connect to a remote server quite substantially.
What does this change do?
A combination of techniques, some types are moved to the new crate (and imported back into their old locations), some fields and declarations are wrapped with cfg annotations. It seems probable that something went wrong here.
What is your testing strategy?
I have built with some basic variations of --features to trigger the small and the large build. It is not an exhaustive test, I'll see if I can be more structured tomorrow.
Is this related to any issues?
Yes, the overarching problem with slow builds is discussed in #6954
Have you read the Contributing Guidelines?