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

Two minor issues with todo-api example #380

Open
rustrust opened this issue Jun 6, 2020 · 2 comments
Open

Two minor issues with todo-api example #380

rustrust opened this issue Jun 6, 2020 · 2 comments

Comments

@rustrust
Copy link

@rustrust rustrust commented Jun 6, 2020

Issue 1. The todo-api example also mentions a .env-example file which does not exist

Issue 2. When compiling the todo-api example:
error: current package believes it's in a workspace when it's not:
current: ~/src/rust/sqlx/examples/postgres/todo-api/Cargo.toml
workspace: ~/src/rust/sqlx/Cargo.toml

this may be fixable by adding examples/postgres/todo-api to the workspace.members array of the manifest located at: ~src/rust/sqlx/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the workspace.exclude array, or add an empty [workspace] table to the package's manifest.

@abonander
Copy link
Collaborator

@abonander abonander commented Jun 9, 2020

We have the other examples in the workspace so I think this was just an accidental omission.

The fix is definitely to add "examples/postgres/todo-api", here:

sqlx/Cargo.toml

Lines 10 to 12 in e1d22a1

"examples/postgres/listen",
"examples/postgres/todos",
"examples/sqlite/todos",

@abonander
Copy link
Collaborator

@abonander abonander commented Jun 9, 2020

However, the .env-example file does exist: https://github.com/launchbadge/sqlx/blob/master/examples/postgres/todo-api/.env-example

The leading dot causes it to be sorted above the other files and hidden by default in file explorers like Nautilus (Gnome).

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.