Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: put db con behind feature gate#268

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
psteinroe wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromfeat/db-con-flag

Conversation

psteinroe
Copy link
Collaborator

@psteinroepsteinroe commentedMar 29, 2025
edited
Loading

EDIT: putting this into draft again. there are other issues that I need to figure out before we should continue in this direction.

  • get pg_query (or libpg_query? run build in wasm).link
  • I just pushed everything into this branch. need to clean it up and remove the wasm stuff first.

What kind of change does this PR introduce?

puts database connection behind a feature gatedb-connection. the flag is enabled by default, so nothing changes.. turns outdefault-features is a mess. I will remove them, and instead subscribe to that feature wherever it is relevant.

this is premiliary work for#174. after this pr, my plan is to

  • provide a wasm build without any database first and then
  • dive deep into integrating pglite. right now, I believe there is still work to be done on their side for us to make the integration seamless.

@juleswritescode I also "copied" the completion params into the workspace trait and implementedFrom for each. reason is that I do not want to includepgt_completions for the no-db build because it hasschema_cache in its dependency, which in turn requiressqlx. yet another reason we should move things into afeature/ directory.

What is the current behavior?

sqlx and database features are built all the time, leading to a failing build for wasm.

What is the new behavior?

we can exclude sqlx from the build by disabling the default feature flagdb-connection

#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
pub struct CompletionItem {
pub label: String,
pub(crate) score: i32,
Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

question: do we even need the score here?

@psteinroepsteinroe marked this pull request as draftMarch 29, 2025 15:56
@psteinroepsteinroe removed the request for review fromjuleswritescodeMarch 29, 2025 15:57
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@psteinroe

[8]ページ先頭

©2009-2025 Movatter.jp