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

Support recursive globs for source statement #102

Open
tlammi opened this issue Feb 26, 2021 · 0 comments
Open

Support recursive globs for source statement #102

tlammi opened this issue Feb 26, 2021 · 0 comments

Comments

@tlammi
Copy link

tlammi commented Feb 26, 2021

I tested the tool a bit and detected that the glob passed to source does not support recursive globs. Would it be feasible to implement that behavior? It would simplify searching for Kconfigs down the file hierarchy.

I tested the behavior with adding an extra recursive=True parameter to iglob in kconfiglib.py with Python 3.9. This allowed me to use recursive globs in the statement but broke the recursive self-sourcing check causing an exception to be raised and not caught.
I.e. rsource "./*/**/Kconfig" works as intended but rsource "./**/Kconfig" causes a recursive self-sourcing.

Seems like the recursive option is available at least since Python 3.5 but not in Python 2.7, so the implementation would be a bit more complicated if 2.7 support is to be kept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant