-
-
Notifications
You must be signed in to change notification settings - Fork 898
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
Ignore BOM in package.json when submitting a package #4135
Comments
Could you provide an example repository? |
BTW, I don't think a package.json with BOM can work in Unity: The BOM should be removed before submitting to openupm. Perhaps the error message could be better than |
The package version that I tried to submit: https://github.com/Netherlands3D/Json-Extras/tree/a2bf1e27ad47b4303e4e224f0f8f5327cdea51ee (the next commit is the BOM fix) And this repository worked in Unity, so it would seem that Unity strips the BOM internally? |
Also: it may be a Rider thing; I have now applied the fix as suggested in https://forum.unity.com/threads/apparently-my-package-json-is-invalid-when-trying-to-add-my-own-package.1175081/#post-7533989 to prevent Rider from adding BOMs :) |
Thanks for the info. Then we shall align with the Unity editor. Let's keep this open. For now, it's a low priority. |
Feature request
When you submit a new package using the website and the package.json of that package contains a Byte Order Marker (BOM), then an error is shown that says it encountered invalid characters at the start of the package.json.
I think it would be beneficial if, prior to sending it to the parser, the reader strips the BOM itself when present; or a the least it shows a more descriptive error message when a BOM is present.
Feature category
What problem does this feature solve?
Being unable to submit a package and helping developers get their package submitted if they do not know about BOM.
How should this be implemented in your opinion?
I think it would be beneficial if, prior to sending it to the parser, the reader strips the BOM itself when present; or a the least it shows a more descriptive error message when a BOM is present.
Are you a regular backer or sponsor at patreon.com/openupm?
No
Are you willing to work on this yourself?
Not at this moment, I have too much on my plate to take on this extra task
The text was updated successfully, but these errors were encountered: