Comments (8)
I have found the same issue:
Environment
re-frame-10x: 1.5.0
Linux Ubuntu: 22.04.x
Chrome: 105.0.5195.125 (Official Build) (64-bit)
re-frame: 1.3.0
devtools: 1.0.6
highlight.js: 11.6.0
from re-frame-10x.
Update: confirmed that downgrading 10x to 1.3.0 solves the problem; I'll just go with that for now on our project (but happy to test other solutions if/when that would be helpful).
from re-frame-10x.
The root cause is incorrect usage of Highlight.js
- in highlightjs/highlight.js#3057 they effectively removed undocumented ability to highlight children elements by calling highlightElement
in their common parent. And it seems that that ability have never really been there in the first place - I tried rolling back to multiple versions of Highlight.js
, all the way to 10.7 (apparently the smallest version where the API required by re-frame-10x
is supported), to no avail.
It seems to me that a proper fix would be to:
- Incorporate
re-highlight
intore-frame-10x
because IMO changes required for a fix go beyond the scope ofre-highlight
(and seems that that library was created specifically forre-frame-10x
in the first place - not sure why those trivial 15 lines weren't written withinre-frame-10x
in the first place; I'm also not sure why it sets the non-publiccalled
property - it doesn't seem like it should do anything at all in the versions ofHighlight.js
that have the required API) - Rewrite this block in such a way so that it's still in the same
[:pre [:code ...]]
buthighlightElement
is called on each child separately (of course, each child will have to be wrapped in aspan
)
Alternatively, the scope of re-highlight
could be expanded so it supports highlighting within highlighting, and then hljs-compatible?
could be removed - it should be completely opaque to re-frame-10x
whether the right version is used or not.
from re-frame-10x.
Both highlighting & crash removed in 1.7.0
from re-frame-10x.
Thanks, it's appreciated!
from re-frame-10x.
Update 2: created a minimal-ish repro by creating a project with
lein new luminus crash10x +shadow-cljs +cljs +re-frame
and removing re-frisk from the project, adding preloads etc for 10x, and changing the event fn
s to fn-traced
so there'd be something present in the Events tab. Should have made an initial commit after the creation with luminus but didn't think to at the time, apologies.
That's here: https://github.com/eggsyntax/crash10x
from re-frame-10x.
Disabled syntax highlighting for now, since this crash seems pretty bad.
@p-himik, thanks for the detailed analysis, I'll look into it.
It may be just because I'm new, but re-highlight seems hard to maintain. I'm considering whether to fix re-highlight or replace it with something simpler.
from re-frame-10x.
Added new highlighting that doesn't depend on highlight.js. No more react bugs.
from re-frame-10x.
Related Issues (20)
- [Bug]: highlight.js/lib/languages/gml.js error HOT 1
- [Bug]: "Set literal contains duplicate key" when `*print-length*` is set HOT 2
- [Enhancement]: Find a key in a map more easily.
- [Bug]: "guide me to greatness" did not guide me to greatness HOT 1
- [Bug]: traced-result is always nil
- [Bug]: 10x crashes with console error: Invalid number HOT 6
- [Bug]: Unable to load in combination with shadow-cljs HOT 2
- [Enhancement]: clarification in docs
- [Bug]: Sorting an app-db view with non-comparable keys crashes re-frame-10x HOT 3
- [Bug]: The required namespace "day8.re-frame-10x.preload.react-18" is not available. HOT 4
- Performance improvements - remove garden/spade? HOT 7
- [Bug]: Pop-out no longer working HOT 4
- [Bug]: build warning after 1.9.7 update
- [Bug]: latest 1.9.8 causes reagent/react console warning for non unique elements HOT 3
- [Enhancement]: Shortcut to pop out to window
- [Bug]: ignored-events in project configuration are ignored. HOT 2
- [Enhancement]: Update sidebar css + settings
- [Bug]: I can't expand maps under 3 keys even when the data is long. HOT 3
- [Bug]: React 17 render still used in popup
- [Bug]: Expanding a data structure in the epoch list, causes app-db to be set to that epoch
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 re-frame-10x.