-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Autoname extensions #3380
Comments
I like that things are explicit, it also isn't more repetitive than the package itself. I think it is also nice if there is just one way to specify the extension since it is enough to learn one way. In addition, this is something you set it up once and then don't have to bother with it again, and not something you have to type everytime you use an extension. |
I'm thinking about consistency, not just convenience of typing. Would be nice to have an "official" naming scheme, suggested or even enforced by |
Due to some existing deficiencies. There is nothing inherently problematic about it. |
So, is it fine if different packages have extensions with the same name? Due to that sysimage issue, some packages started prepending their name to the extension, leading to very long and redundant names as a result. ✓ LogExpFunctions → LogExpFunctionsInverseFunctionsExt
✓ LogExpFunctions → LogExpFunctionsChainRulesCoreExt would really be better as ✓ LogExpFunctions → InverseFunctionsExt
✓ LogExpFunctions → ChainRulesCoreExt assuming extension names don't have to be distinct. |
Anyway, no matter what naming scheme is decided on, it would be nice to have it uniform and consistent across packages. |
Basically everyone would follow the recommended naming scheme for extensions: extension triggered by
SomePkg
should be namedSomePkgExt
. Can this naming be done automatically to reduce repetition?Currently, there are lots of unnecessary repetitions in the common case:
Project.toml
[extensions]
SomePkgExt
= SomePkg
SomePkgExt.jl
module SomePkgExt
Maybe, at least some of these could be removed?
For example, instead of
SomePkgExt = SomePkg
allow justSomePkg
in[extensions
]?And/or implicitly define
module SomePkgExt
in the corresponding file?The text was updated successfully, but these errors were encountered: