Skip to content

Conversation

@KrystalDelusion
Copy link
Member

@KrystalDelusion KrystalDelusion commented Jun 5, 2024

What are the reasons/motivation for this change?

Allows e.g. log "yosys> flatten;;", logging the unquoted text yosys> flatten;;.

Explain how this is achieved.

If the text to log starts and ends with a quotation mark, drop the first and last characters.

If applicable, please suggest to reviewers how they can test the change.

@KrystalDelusion KrystalDelusion changed the title Quote stripping in commands Quote stripping in log command Jun 7, 2024
@KrystalDelusion KrystalDelusion marked this pull request as ready for review June 8, 2024 01:11

test_log "test" "test"
test_log "test;" "test"
test_log "test;;" "test"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows e.g. log "yosys> flatten;;", logging the unquoted text yosys> flatten;;.

Doesn't this line test that the semicolons would be discarded?

Copy link
Member Author

@KrystalDelusion KrystalDelusion Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, contrast with the later test_log "\"test;;\"" "test;;" which tests if putting them in quotes prevents removing them, i.e. "\"test;;\"" -> log "test;;" because bash doesn't include the outer quotes when doing the variable substitution.

@KrystalDelusion KrystalDelusion added the merge-after-jf Merge: PR will be merged after the next Dev JF unless concerns are raised label Jul 18, 2024
Currently provides tests for logging quoted strings.
We can now fake the `yosys> flatten;;` line, so we no longer need to explain the split flatten/clean.
If a command has a single argument, and that argument is quoted, strip the quotes.
`log "` should log `"`.
Also fix test script to correctly fail when more than one test fails.
@KrystalDelusion KrystalDelusion removed the merge-after-jf Merge: PR will be merged after the next Dev JF unless concerns are raised label Aug 19, 2024
@KrystalDelusion KrystalDelusion added the status-paused Status: Unfinished, not actively worked on, PR author intends to continue PR in the future label Jan 22, 2025
@ShinyKate
Copy link
Collaborator

@KrystalDelusion should I close / move to backlog?

@widlarizer widlarizer added status-superseded Status: Work continues in a different PR or was made redundant and removed status-paused Status: Unfinished, not actively worked on, PR author intends to continue PR in the future labels Sep 24, 2025
@widlarizer
Copy link
Collaborator

Superseded by #5385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status-superseded Status: Work continues in a different PR or was made redundant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants