Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ready] Add support for building in "offline/decoupled" mode #249

Merged
merged 14 commits into from
May 30, 2020

Conversation

abonander
Copy link
Collaborator

@abonander abonander commented Apr 14, 2020

TODO:

  • add support in sqlx-macros
  • rebase on develop (will necessitate creating a new PR) master
  • implement cargo sqlx prepare
  • integration test
  • document offline mode

@abonander abonander force-pushed the ab/offline branch 2 times, most recently from 0b04cc9 to 7fe04da Compare April 21, 2020 21:15
@abonander abonander force-pushed the ab/offline branch 2 times, most recently from 58aa149 to 9b496da Compare May 1, 2020 03:49
@phated
Copy link
Contributor

phated commented May 4, 2020

Love this work! Let me know if I can help out by testing it against my side project or in any other ways.

@abonander abonander force-pushed the ab/offline branch 4 times, most recently from a925a30 to 1d60958 Compare May 9, 2020 01:38
@abonander abonander marked this pull request as ready for review May 9, 2020 01:40
@abonander abonander force-pushed the ab/offline branch 5 times, most recently from ef08779 to 92579df Compare May 13, 2020 03:30
@abonander abonander force-pushed the ab/offline branch 2 times, most recently from 1996a00 to 0c19ee9 Compare May 15, 2020 02:58
@abonander abonander force-pushed the ab/offline branch 11 times, most recently from f5035e7 to 6097028 Compare May 16, 2020 03:16
@phated
Copy link
Contributor

phated commented May 20, 2020

Thanks for looking into that! I'm just glad I can help in some small way. 😄

@abonander
Copy link
Collaborator Author

@JesperAxelsson I've made some significant changes in this PR to cargo-sqlx (renamed to sqlx-cli) if you'd like to look it over; it'll be rebased after merging your pending PRs.

@JesperAxelsson
Copy link
Contributor

@JesperAxelsson I've made some significant changes in this PR to cargo-sqlx (renamed to sqlx-cli) if you'd like to look it over; it'll be rebased after merging your pending PRs.

Looking good to me!
One thing we should take a look at later is the url handling. Right now sqlx lib and the cli use different ways to parse the url. While it's fine now it might cause issues. And the url parsing I wrote is really fragile ^^.
The same can be said about get_db_kind() and get() for migrator, a user would quite confused if one failed while another accepted their url.
But there is already some work being done to create a more robust url parser if I remember correctly?

@phated
Copy link
Contributor

phated commented May 28, 2020

@abonander I've been doing some more stuff with this and it seems that the last changes have made it so this command can't be run at the project root of a cargo workspace. Any ideas how that could be made to work again?

@abonander
Copy link
Collaborator Author

@phated what error do you get?

@phated
Copy link
Contributor

phated commented May 28, 2020

@abonander thanks for the quick response. Here's the error I see when running it in the root of my workspace.

error: manifest path /Users/phated/github/twentyfive-stars/Cargo.toml is a virtual manifest, but this command requires running against an actual package in this workspace
Error: cargo check failed with status: exit code: 101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants