Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Simplify language matching by assuming the language exists #518

Closed

Conversation

ErinvanderVeen
Copy link
Collaborator

We had two instances in language.rs where we matched on the language name (which was mostly the identity function), only to error if the language didn't exist.

I don't think we need to do this, especially as we move towards dynamic loading, where the engine would ideally not know about languages at all.

Also, the error will be found right away anyway, when trying the access the file.

There are some places where we cannot remove the matching, at least until #4 is implemented.

@ErinvanderVeen ErinvanderVeen linked an issue Jun 19, 2023 that may be closed by this pull request
@ErinvanderVeen ErinvanderVeen force-pushed the 507-reduce-number-of-language-references-in-code branch 2 times, most recently from a2c4e63 to e42f9db Compare June 19, 2023 14:09
These are removed by assuming a language always exists. Any missing language will be found later.

Additionally, this commit standardizes the language names and filesnames to always use -.
@ErinvanderVeen ErinvanderVeen force-pushed the 507-reduce-number-of-language-references-in-code branch from e42f9db to 2bec0ab Compare June 29, 2023 06:16
@ErinvanderVeen
Copy link
Collaborator Author

Deprecated in favour of #156

@ErinvanderVeen ErinvanderVeen deleted the 507-reduce-number-of-language-references-in-code branch July 15, 2024 07:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce number of language references in code
1 participant