Skip to content

Multiline expressions in .actrc #2681

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

Open
wooseopkim opened this issue Feb 23, 2025 · 2 comments
Open

Multiline expressions in .actrc #2681

wooseopkim opened this issue Feb 23, 2025 · 2 comments
Labels
kind/feature-request New feature or request

Comments

@wooseopkim
Copy link
Contributor

Act version

0.2.74

Feature description

.actrc performs basic expansion, but its syntax is quite simple. I really appreciate its simplicity for making the format reliable and readable. However, one more functionality would be of great help in my view. It's Bash style multiline expression. In bash, \ is often used to escape newlines, splitting long expressions into multiple lines. I think act also could benefit from its power. This feature would be specifically useful in case of arguments like --container-option which may have long values.

As of now we have to:

--container-option --volume /path/to/somewhere:/var/run/something --privileged --gpus all

It would be much more readable if we could:

--container-option \
  --volume /path/to/somewhere:/var/run/something \
  --privileged \
  --gpus all

Given that --container-option was first introduced with an initial intention of deprecating multiple parameters, it seems reasonable to assume the argument could grow pretty lengthy. For this reason, I suggest multiline expressions for .actrcs.

@panekj
Copy link

panekj commented Feb 23, 2025

I don't like this and I would like to never expand .actrc parsing in any way. If you need to have more custom formatting, you should use a shell script for that.

@wooseopkim
Copy link
Contributor Author

I don't like this and I would like to never expand .actrc parsing in any way. If you need to have more custom formatting, you should use a shell script for that.

I see what you're trying to say, and I think you got a solid point. Still I think this humble suggestion is worth measuring its gains (flexibility and readability) against losses (e.g. maintaining burdens and possible error sources). Certainly more than "I dont' like this" or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants