-
Notifications
You must be signed in to change notification settings - Fork 201
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
Fresh CLI build not working with demo examples #358
Comments
Ow! I think i know why . Can you update your language = "java"
substitutions = [
["stale_flag_name", "SAMPLE_STALE_FLAG"],
["treated", "true"]
] Actually, I changed the type of language from list to unary. To my knowledge I have updated all the tests/demos . Maybe I have not updated the README (yea I have not ) Sorry about that. |
Hey @ketkarameya thanks for following up. That actually gave back the same error again even using the string input for the language instead. I also added the treated_complement to try and mimic the python script example here
|
I just tested it against the
Seeing as this is the same error I get if no piranha_arguments file exists I wonder if it's either not being read at all or if the values are being replaced with empty defaults somehow in this PiranhaArguments::merge function. Happy to test anything out if it helps. |
Yea. There is a problem with PiranhaArguments. After the overhaul I have not accounted for the command line usecase throroughly. I ll get to it soon. |
@conormurray95 can you try this branch - |
The command has changed . You don't need to pass a pass the language as |
Hey @ketkarameya that branch looks good for my CLI use case here. Tested by building with the Dockerfile ^ and running the java demo with this input: Thanks for the quick updates! |
@conormurray95 I am curious what is your specific use-case where you prefer using the cli over python/rust API ? |
@ketkarameya our team want to use the tool to cleanup flags but aren't rust/python developers so a cli tool seemed the more natural choice to get started, especially seeing as all of our other tooling e.g. gofmt, golint, goimports etc are all cli tools too. It was also to avoid any worries about installing dependencies and needing specific python versions to run it that might conflict with peoples existing setups. In terms of how I've used it so far I packaged the binary up inside a minimal Dockerfile that we can run in CI or locally without installing any deps using a For ease of use for other developers it would be more convenient if the binary was available via something like homebrew that could be installed with one command and used via the cli. The reason I have it as a dockerfile right now is so our
but really that's just a workaround so I can make it a one click install experience for others on our team. All that being said I'm fairly new to the tool so if theres a better way to go about this I'd be all ears. |
Summary
I pulled the latest piranha codebase and attempted to compile and run the CLI binary against the
feature_flag_cleanup/java
example and couldn't get it to work using the documented inputs.Steps to reproduce
demo/feature_flag_cleanup/java/configurations
that looks like this:docker build -t piranha:latest -f ./Dockerfile .
docker run -d -t piranha:latest
docker exec -it ${CONTAINER_ID} /bin/bash
cd piranha/
cargo build --release
target/release/polyglot_piranha --path-to-codebase demo/feature_flag_cleanup/java/ --path-to-configurations demo/feature_flag_cleanup/java/configurations/
Error
RUST_BACKTRACE=1 target/release/polyglot_piranha --path-to-codebase demo/feature_flag_cleanup/java/ --path-to-configurations demo/feature_flag_cleanup/java/configurations/
Full backtrace:
Other Info
This error is the same if I delete piranha_arguments.toml file so I'm unsure if it's actually reading it at all.
I can successfully build the python version of
polyglot-piranha
and run using the scriptdemo/stale_feature_flag_cleanup_demos.py
.The text was updated successfully, but these errors were encountered: