Fix build:all
output on Windows
#8089
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello 👋,
so this isn't a new bug, it's always been like that 👀 💦 Previously, I typically made changes to Python files, so I changed them inside of
material
directory and later copied them over tosrc
, and I was caught red handed when working on theinfo
plugin when I didn't update the build logic to not delete a custom.gitignore
file😅When following the development guide for the theme it mentions to build the project with
build:all
in preparation for a PR, as this will recreate all files and make sure everything is updated.The issue is that the logic relied on the placement of
/
separators in strings, and Windows uses\
, so none of the plainassets/javascripts/bundle.js
paths got converted back tobundle.1a2b3c.js
for the deployment.When running the
npm run build:all
command with any commit before this PR on Windows and without doing any changes this would be the output ofgit status
:Most of these are files where the paths weren't replaced because they used the
\
separator, when on Windows.After fixing the first issue the next bubbled up:
The icons are gathered like all other paths, using the
resolve
function which in turn uses thetiny-glob
npm module. Based on this issue my observation is that depending on the OS the order of files differs when there is_
in the file name.While fixing this I've noticed that the icon search index doesn't contain the latest emojis. Not sure how this happened 🤔
Only explanation I have is that somehow you haven't updated the twemoji_db file on your local system for the last 6 months. You can see
woman_walking_facing_right
is not found in the deployment and it's part of the twemoji_dbThe last thing which could be fixed to declutter the
git status
noise, is the.icons/material/LICENSE
file which contains theCRLF
line endings and this file is marked as modified, despite being converted toLF
later. But I left it as-is.Checked on MX Linux VM, and it does still work on the UNIX system, so I think macOS should work as well. Also all changes which would decrease performance (so everything) I tried to limit to Windows only, therefore if there is no need for sorting or path separator replacement, the other OS just use the data like before.