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

[Feature Request] Warning for module imports with uppercase letters #220

Open
joshichaitanya3 opened this issue Apr 12, 2023 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@joshichaitanya3
Copy link
Collaborator

Importing modules with the right name but incorrect cases results in an error. Morpho modules are by convention named using all lowercase characters, so it would be useful if Morpho throws a warning instead, highlighting the presence of uppercases in the import statement.

Confusion can be caused by namesake classes, since classes are named using uppercases by convention.

E.g.

>import MeshGen
Error 'MdlNtFnd' [line 1 char 14] : Module 'MeshGen' not found.
>import meshgen

>var mg = MeshGen(...
@joshichaitanya3 joshichaitanya3 added bug Something isn't working enhancement New feature or request labels Apr 12, 2023
@softmattertheory
Copy link
Contributor

I think what would be a great idea here is if the resource finder locates a "nearby" resource, we could offer an error:

Module 'MeshGen' not found; did you mean 'meshgen'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants