The Hermes engine output is different every release-react despite no code or resource changes. This difference seems to stem from the JS path being baked into the binary output.
Repro Steps
Run the provided command (with your own variables) on a Hermes enabled project 2 times back to back.
Expected behavior
Releasing code which contains duplicate code results in
Error: The uploaded package was not released because it is identical to the contents of the specified deployment's current release.
Details
Is there a particular beacon/command that you are having trouble with?
appcenter codepush release-react
Which version of the App Center CLI are you using?
2.11.0
Which OS version did you experience the issue on?
MacOS M1 13.0.1
What command line/shell are you using?
N/A
What version of Node.js and NPM/Yarn are you using?
Node v16.13.2 (but shouldnt be applicable I dont think)
Relavant information
This is not unique to any specific library and can be observed on a simple 1 liner JS file. As mentioned above the issue seems to be that Hermes bakes in the JS file path into the output, since CodePush builds to a temp folder which is auto generated by the system its different every time.
3. Compile using an different path (literally any other path to the file)
```shell
hermesc -emit-binary -out index_b.hbc ~/test_hermes/index.js -w
xxd index_b.hbc > index_b.hex
Description
When running the command multiple times I never get a collision of code when using Hermes:
The Hermes engine output is different every
release-react
despite no code or resource changes. This difference seems to stem from the JS path being baked into the binary output.Repro Steps
Run the provided command (with your own variables) on a Hermes enabled project 2 times back to back.
Expected behavior
Releasing code which contains duplicate code results in
Details
appcenter codepush release-react
Relavant information
This is not unique to any specific library and can be observed on a simple 1 liner JS file. As mentioned above the issue seems to be that Hermes bakes in the JS file path into the output, since CodePush builds to a temp folder which is auto generated by the system its different every time.
Recreating diff Hermes output
Create a javascript file (or any project will do)
Compile JS to Hermes using a relative path
A possible fix
When generating the Hermes hbc file do it relative to the temp folder so the path is always the same: