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

Auto loading of languages breaks mutation testing elements #393

Closed
nicojs opened this issue Mar 28, 2020 · 2 comments
Closed

Auto loading of languages breaks mutation testing elements #393

nicojs opened this issue Mar 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@nicojs
Copy link
Member

nicojs commented Mar 28, 2020

When the mutation-testing-elements report loads a language it does not have build-in syntax highlighting for, it will fall back on the autoloader. It will actually download the language highlighting on the spot. This works with the prism autoloader plugin.

However, there is currently no way to register a callback for when syntax highlighting is done. This is vital since we need to attach mutants to the properties of the mutant-components here:

The result is that the mutants will not be bound to the mutation-test-report-mutant elements which in turn makes the mutants invisible
image

See PrismJS/prism#2275

Thanks to @theofidry for pointing this out to me in infection/infection#1149

As a workaround, we should disable autoloading and just add languages whenever we want to support one. We'll be adding php shortly 🤝

@nicojs nicojs added the bug Something isn't working label Mar 28, 2020
nicojs added a commit that referenced this issue Mar 28, 2020
Disable automatic loading of syntax highlight settings for unknown languages.
Include PHP in the supported languages.

Workaround for #393
@nicojs nicojs closed this as completed Jul 8, 2020
@nicojs
Copy link
Member Author

nicojs commented Jul 8, 2020

Fixed with the pr

@theofidry
Copy link

👍

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

No branches or pull requests

2 participants