-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Dart2js minified vs non-minified treats shifts differently if value < 0 #30841
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
Comments
The difference can't be minification - it does not work in a way that could make this difference - all minification does is choose short names. I suspect that you are running in a browser and the debug run is on Dartium and not compiled by dart2js at all, and the release run is compiled with dart2js and run with Chrome. Please confirm. If this is the case, it is working as intended. You can force the sign back by replacing |
So I checked and your are right that this is not a minified vs unminified, but My point is that the behavior of the shift during development and release is different. Using dart-sdk 1.25.0-dev.16.3 and dart-sdk 2.0.0-dev.2.0 (Results are the same) Run from WebStorm as Debug in Run a test:
Test failed:
Pub: Build mode Debug, uploaded to Webserver Chrome 61.0.3163.10 64-Bit: Firefox 56.0 32-Bit: Pub: Build mode Release, uploaded to Webserver Chrome 61.0.3163.10 64-Bit: Firefox 56.0 32-Bit: |
I'm closing this issue: |
This is 3 years old and was not fixed? Oh me, oh my... Server:
Client:
|
Unfortunately, it's working as intended for the VM and Web to differ on You can see more discussion on why In your example above, you can do |
From @stephan-gruen on September 12, 2017 13:0
I ran into this while testing out the BZip2Encoder class from the widely used archive library, which does not work if minified.
At the end of the day this is why: the shift result from unminified and minified JavaScript is not the same if the value is negativ. So this is bad as the behavior should be the same.
pub build mode Debug (uses dart2js to generate unminified JavaScript):
pub build mode Release (uses dart2js to generate minified JavaScript):
Copied from original issue: dart-lang/pub#1703
The text was updated successfully, but these errors were encountered: