-
Notifications
You must be signed in to change notification settings - Fork 39
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
test: add full integration test for tuono new CLI command #411
base: main
Are you sure you want to change the base?
test: add full integration test for tuono new CLI command #411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Robert-maker1994 there are conflicts into your branch.
Could you please resolve them? Unless you do CI won't run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of considerations. I'm available for discussing them
crates/tuono/src/main.rs
Outdated
use tuono::cli::app; | ||
|
||
fn main() { | ||
dotenvy::dotenv().ok(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things here:
- I'd put everything within
app
for better future integration tests - I'd use dotenvy_macro to load the env at compile time (otherwise the published build will ask for it to the users)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to implement the dotenvy_macro and I found a problem as the dotenvy_macro doesn't recognise the .env file. There seems to be a few open issues to do with this macro!
issue with the env path
Compile-time macro should be configurable with path - With the macro not being able to load with .env.
I am a little stuck on what to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repository seems updated with the fix.
We could trying loading the dependency using a fixed git commit with a commit to remember to load it from crates as soon as they release. WDYT? Seems a very little module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, seems a very little module and the main contributor says this is coming in v0.16. I've added the repository, I've moved initializing dotenv::load
untill the cli app function.
There was an issue with "PR title checker" workflow. Apologies for the inconvenience 😰 |
@@ -31,8 +31,10 @@ serde_json = "1.0" | |||
fs_extra = "1.3.0" | |||
http = "1.1.0" | |||
tuono_internal = {path = "../tuono_internal", version = "0.17.5"} | |||
dotenvy = { git = "https://github.com/allan2/dotenvy", features = ["macros"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should fix it with a commit so that we "kinda" prevent regression on the main branch. Do you know when the 0.16
will be released? I think that if it is not too far away we can wait it to merge this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for a response from the main maintainer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can give it a day or so then decide what to do if he responds or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Thanks for running the extra mile! In case that is not possible, we can try to figure out another configuration system different from .env
Close #405