-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
WARNING: preserve ownership not supported on platform #646
Comments
I just did some manual bisecting of releases to see (1) if this was related to a change in The issue starts occurring at I haven't diff-ed the versions yet, or dug into the code, to identify an issue in the code, but this clearly aligns with something in |
Reference: --preserve or -p flag to |
It looks like the default --preserve value was changed, although I am not entirely sure. In v2.12.9 is was Commit 38f0e88 removed the NoOptDefVal. |
Thanks for the bug report. There was a big change in library for the commit you reference, from using spf13's You can remove the |
Changed that if getting/setting ownership is not supported on platform, the default value for |
I saw that the previous setting for --preserve was I did start using the --preserve flag so that solves my issue! The new functionality to automatically determine if "ownership" is supported is even better! Much appreciated. I am not minifying a lot of files. One .css to .min.css. My CPU just sits at 25%+ for the minify process. I am not sure what it is doing! |
You minify only one file? How big is it? How long does it take to minify? I
suppose you have 4 CPU cores which means it is working full for that file.
It should take a split-second, so this may be a bug in the CSS minifier. If
that is the case, could you send me the file to fix the bug?
…On Mon, Dec 11, 2023, 19:13 c9845 ***@***.***> wrote:
I saw that the previous setting for --preserve was nil which then got set
to mode, ownership, timestamps but for some reason this error does not
occur. It have a feeling nil is being used instead of the NoOptDefVal.
Regardless, that is in an old version of this....
I did start using the --preserve flag so that solves my issue! The new
functionality to automatically determine if "ownership" is supported is
even better! Much appreciated.
------------------------------
I am not minifying a lot of files. One .css to .min.css. My CPU just sits
at 25%+ for the minify process. I am not sure what it is doing!
—
Reply to this email directly, view it on GitHub
<#646 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKOGHUHVV7D3ZF3N67ED2DYI6ASDAVCNFSM6AAAAABAQJPHUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQHE3TMMZQHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm pretty sure the problem is a little further down in the function, where I compare the root path with the src path, and unless they are equal it No need to send me the file thus, let me work on a fix and I'll need you to verify it's working, thanks! |
Taco, Plus, it looks like the "preserve ownership" sort-of-a-bug has been fixed. |
Alright, in the mean time I've pushed out a (possible) fix for the endless loop. Are you able to test from the master branch? You need to clone the repository and run |
I cloned the repo and tested. The --preserve issue is fixed! |
) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/tdewolff/minify/v2](https://togithub.com/tdewolff/minify) | indirect | patch | `v2.20.6` -> `v2.20.10` | --- ### Release Notes <details> <summary>tdewolff/minify (github.com/tdewolff/minify/v2)</summary> ### [`v2.20.10`](https://togithub.com/tdewolff/minify/releases/tag/v2.20.10) [Compare Source](https://togithub.com/tdewolff/minify/compare/v2.20.9...v2.20.10) - [cmd: default value for --preserve only includes ownership if supported on platform](https://togithub.com/tdewolff/minify/commit/d579304e76fbf4c9de4b6cafab3dd9246c00edcc), see [https://github.com/tdewolff/minify/issues/646](https://togithub.com/tdewolff/minify/issues/646) - [cmd: fix endless loop on preserving attributes on Windows, see](https://togithub.com/tdewolff/minify/commit/ca97b30acea0a22471011ccd3b075325a5e576b8) [https://github.com/tdewolff/minify/issues/646](https://togithub.com/tdewolff/minify/issues/646) - Fix various parsing bugs for JS/HTML in `tdewolff/parse` ### [`v2.20.9`](https://togithub.com/tdewolff/minify/releases/tag/v2.20.9) [Compare Source](https://togithub.com/tdewolff/minify/compare/v2.20.8...v2.20.9) Fix build ### [`v2.20.8`](https://togithub.com/tdewolff/minify/releases/tag/v2.20.8) [Compare Source](https://togithub.com/tdewolff/minify/compare/v2.20.7...v2.20.8) - [HTML: fix parsing of PHP/ASP/EJS files](https://togithub.com/tdewolff/minify/commit/5b4030cc8240edf4b87bc8d195bc3f3d1ca46f50) - [cmd: support ASP, PHP, Mustache, Handlebars, EJS and Go templates for command line](https://togithub.com/tdewolff/minify/commit/5b4030cc8240edf4b87bc8d195bc3f3d1ca46f50) ### [`v2.20.7`](https://togithub.com/tdewolff/minify/releases/tag/v2.20.7) [Compare Source](https://togithub.com/tdewolff/minify/compare/v2.20.6...v2.20.7) - [JS: fix parsing of empty for-loop,](https://togithub.com/tdewolff/minify/commit/be084bb11b53852ae0b8147585b210bed1f85a85) [fixes](https://togithub.com/tdewolff/minify/commit/be084bb11b53852ae0b8147585b210bed1f85a85) [https://github.com/tdewolff/minify/issues/636](https://togithub.com/tdewolff/minify/issues/636) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMTUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjExNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Over the last month or so, I have been receiving a 'WARNING: preserve ownership not supported on platform' warning when using the
minify
binary to compress files. I also get a resulting spike in CPU usage (the messages are logged constantly until the process is killed). I receive this message when minifying CSS or JS, using a command such as follows:minify -w -v -o website/static/css/styles.min.css website/static/css/styles.css
. Note, however, that minifying does work, most of the time, unless CPU is exhausted.I cannot identify what the issue is, or why it started occurring. I have used
minify
in my development process for a long time without issue. I tried to do some debugging without success.I am running W11 22H2 (this occurred on 22H1 too).
I installed
minify
usinggo install github.com/tdewolff/minify/v2/cmd/minify@latest
.I am on the latest version of
minify
.The text was updated successfully, but these errors were encountered: