colorediffs
colorediffs copied to clipboard
“Found missing CSS style” when building add-on
I was going to try to investigate issue #104, which is also affecting me, but when I tried to build the add-on, I got the following error after downloading highlight.js:
Checking that all CSS styles from highlight.js are listed in the add-on...
[WARNING] Found missing CSS style: "intellij-light".
make: *** [Makefile:40: check_css_list] Error 1`
In a quick look, it seems this is just because highlight.js included some styles that are not listed in the add-on.
Hi, and thank you for the report!
highlight.js included some styles that are not listed in the add-on.
That would be because the Makefile doesn't pin highlight.js to a specific version, it downloads the latest available. So the one you get today (11.4.0) is different from the one I used last time I updated the add-on (11.0.1, I believe). So the missing styles are “expected”, considering how the current Makefile works.
Well of course it worked for me, because it tells me I need to update the list of styles, but that's far from ideal ideal for other users just trying to build the add-on - and that's without mentioning the risk of breakage if highlight.js introduces API changes. I guess we'd have a number of options here, from pinning the version we download from the Makefile to switching to something else, highlight.js as a git submodule and calling it as a lib maybe, something like that. Pinning a version sounds easy, but I'm not sure we can do it for https://highlightjs.org/download/, which is the only source I found where I can select the languages (diff only) I want to include in the archive.
Of course, we can also update the add-on to support the latest version of higlight.js at some point - although I'm not particularly concerned about the current number of options for CSS themes.
In the meantime, you can skip the checks and build the XPI with make xpi
.
Thanks for the quick reply!
I found the fix quite easy for this one, so I had a patch just in case you want to get it. I created pull request #107 for this.
I created PR #110 with the changes requested in the review of PR #107.
Thanks a lot! I'll leave this issue open for users who may hit something similar in the future, when new versions of highlight.js are released. Until we figure out something to provide a more reliable way to build the add-on.