-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix dash-generate-components
for julia on case-insensitive filesystems
#1567
Fix dash-generate-components
for julia on case-insensitive filesystems
#1567
Conversation
so that the component file name does not conflict with the jl module filename in case-insensitive filesystems when --prefix=''.
Nice catch @etpinard 🍻 I wonder though if we can scope this to just the problematic case, ie a component whose name (prefixed or not) matches the module name? Although to play devil's advocate, in principle you could also imagine someone making a module cc @waralex |
Yep, that's a nice idea. Looking forward to hearing what @waralex has to say here. I'll make the changes accordingly once you have reach a consensus. Cheers! |
Yes, placing files with components in a subdirectory looks like the most reasonable solution. |
This reverts commit 7f8ca06.
- so that their paths never conflict with the julia module file in case-insensitive filesystems - this also makes the src directory less noisy (especially for devs that do not care about julia)
Attempted in 90dfd9f I believe this commit makes this block dash/dash/development/_jl_components_generation.py Lines 515 to 518 in e8ac949
obsolete. Alternatively, we could move the
I tested two cases:
with:
where the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that we should be able to 🔪 os.makedirs("src")
- then this looks good! 💃
... and adapt comment in `generate_struct_file` accordingly.
The problematic scenario occurs when
--prefix
option is left empty''
See example: https://github.com/etpinard/dash-textarea-autocomplete/tree/main/src
Fixes etpinard/dash-textarea-autocomplete#7
The commit below prepends
comp_
in jl component file names. There are other possible solutions to this problem, but I thought this one was the least-invasive. Let me know!Contributor Checklist
optionals
CHANGELOG.md