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

Option tokenizer fails on an enquoted macro expansion #326

Closed
nforro opened this issue Nov 28, 2023 · 0 comments · Fixed by #329
Closed

Option tokenizer fails on an enquoted macro expansion #326

nforro opened this issue Nov 28, 2023 · 0 comments · Fixed by #329
Assignees
Labels
area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. gain/low This doesn't bring that much value to users. impact/low This issue impacts only a few users. kind/bug Something isn't working.

Comments

@nforro
Copy link
Member

nforro commented Nov 28, 2023

Reproducer:

>>> from specfile.options import Options
>>> Options.tokenize('"%test"')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nforro/devel/specfile/specfile/options.py", line 547, in tokenize
    raise OptionsException("No closing quotation")
specfile.exceptions.OptionsException: No closing quotation
@nforro nforro self-assigned this Nov 28, 2023
@nforro nforro moved this from new to in-progress in Packit Kanban Board Nov 28, 2023
@nforro nforro added kind/bug Something isn't working. impact/low This issue impacts only a few users. gain/low This doesn't bring that much value to users. complexity/single-task Regular task, should be done within days. area/general Related to whole service, not a specific part/integration. labels Nov 28, 2023
@nforro nforro moved this from in-progress to in-review in Packit Kanban Board Dec 1, 2023
softwarefactory-project-zuul bot added a commit that referenced this issue Dec 4, 2023
Fix handling of quotes during option tokenization

This reverts commit b5a1ce7 and constructs the input list in such a way that nodes other than string literals are treated as regular characters, making the original algorithm work even with quotes contained within macro expansions and other expressions.
Fixes #326.

Reviewed-by: František Lachman <[email protected]>
@github-project-automation github-project-automation bot moved this from in-review to done in Packit Kanban Board Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. gain/low This doesn't bring that much value to users. impact/low This issue impacts only a few users. kind/bug Something isn't working.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant