Comments (4)
One more thing I forgot to mention: this is a gist where I had put my attempt to run Dart Sass in QuickJS. If you just clone the gist and run the command in the README, it should reproduce the issue:
https://gist.github.com/wch/eb453b73981a7f5715903992accca35e
from dart-sass.
I'm sorry, I'm not sure what's going on here. It's possible that some of the environment sniffing Sass does to try to determine if it's running in a browser environment is returning inaccurate results here, but it's hard to know for sure without more information. If you can debug into the compiled JS code and figure out where it's stalling out, that would help in figuring out what's going on in more detail.
from dart-sass.
Thanks for the suggestion. I dug into it and found a bug in QuickJS! bellard/quickjs#275
The issue is that when a for
loop has a label for the body, a break
is supposed to exit the loop, but in QuickJS, it does not. For example, this is supposed to just print 1
and then break out of the loop, but with QuickJS, it prints 1, 2, 3, 4.
for (var i=0; i<4; i++)
label: {
console.log(i);
break;
}
This code pattern in question occurs in the sass.dart.js
file in A.StylesheetParser0.almostAnyValue$1$omitComments()
, and because of the bug in QuickJS, it gets stuck in an infinite loop.
from dart-sass.
Thanks for digging that up! I'm going to close this out since it's a bug in quickjs.
from dart-sass.
Related Issues (20)
- ESM export of `NodePackageImporter` is missing.
- Node package importer requires an entryPointDirectory in ESM HOT 1
- Deprecation message replaces underscores with hyphens HOT 2
- NodePackageImporter support for subpaths entry points without extensions HOT 8
- Build Errors with Latest Sass Version in GitHub Actions CI/CD Pipeline HOT 7
- Doesnt execute custom functions in renderSync HOT 1
- Node Package Importer can't find ESM entry point if args are provided HOT 1
- An alternate way to define inheritance by utilizing nesting HOT 3
- SCSS silently fails to compile lines beginning with `--` HOT 1
- Miscompilation when Using Sass and CSS Variables HOT 1
- Drop support for plain-CSS-like functions and mixins
- update flag doesn't work with absolute source paths HOT 2
- change in distribution format HOT 4
- Does sass encourage terrorism, kidnapping, murder and rape?
- ImportCache of CanonicalizeResult is broken for relative imports handled by any importer that is not a baseImporter HOT 13
- {DELETE ME] HOT 1
- Unused code elimination and deduplication is not applied when using api: 'legacy' HOT 5
- font-awesome integration HOT 8
- I would like to know which version of dart-sass supports node v10.18.0? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-sass.