This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-09
Channels
- # announcements (4)
- # beginners (44)
- # boot (15)
- # calva (66)
- # cider (66)
- # clojure (75)
- # clojure-austin (4)
- # clojure-europe (2)
- # clojure-finland (1)
- # clojure-italy (3)
- # clojure-nl (10)
- # clojure-russia (3)
- # clojure-sg (1)
- # clojure-uk (109)
- # clojurescript (18)
- # datomic (8)
- # emacs (1)
- # figwheel-main (1)
- # fulcro (5)
- # jobs (1)
- # jobs-discuss (8)
- # kaocha (7)
- # leiningen (11)
- # luminus (2)
- # off-topic (69)
- # pathom (5)
- # re-frame (7)
- # reagent (4)
- # reitit (18)
- # ring-swagger (3)
- # shadow-cljs (123)
- # spacemacs (1)
- # sql (35)
- # tools-deps (89)
- # uncomplicate (3)
- # vim (6)
- # yada (3)
Should closure-defines work in a cljsbuild build when target is nodejs?
In particular goog.DEBUG
Is *ns*
supposed to be in cljs?
When running CLJS tests for a project with varying versions ranging from 1.9.x-1.10.x and varying clj from 1.9 to 1.10 along with it, I’m running across this error:
SyntaxError: Invalid regular expression: range out of order in character class
file:///My/path/to/my-project/target/js/simple.js:5467 in RegExp
TypeError: undefined is not an object (evaluating 'clara.test.run')
undefined:2
:3
Using compiler opts like:
{:main "my.test"
:output-to "resources/public/js/simple.js"
:output-dir "resources/public/js/out"
:asset-path "js/out"
:optimizations :none}
I know this is not a great repro, but has anyone seen an issue similar to this before? The reported line (5467) with the RegExp issue looks like it’s in the middle of the Google closure part of the compiled JS.
I believe it is this line:
goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g;goog.i18n.bidi.stripHtmlIfNeeded_=function(str,opt_isStripNeeded){return opt_isStripNeeded?str.replace(goog.i18n.bidi.htmlSkipReg_,""):str};goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]");goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]");goog.i18n.bidi.hasAnyRtl=function(str,opt_isHtml){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(str,opt_isHtml))};goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl;
And final note, when I use clj 1.7 and a later cljs 1.7.x I don’t see this problem.
I know my version numbers and surrounding details are vague. I’m giving the high-level view to see if anything here looks like something someone else has encountered.It may also be the case that this problem shows up only in running phantomjs tests. I haven’t determined that yet. If is the case though, it’s phantomjs 2.1 (the last that will be released). It could end up just being a phantomjs problem even. Perhaps something in this regex isn’t supported.
does using an alias for a keyword namespace in cljs require having an empty file with (ns the.namespace.in.the.keywords)
?
👍 thanks
getting a weird error in cljs 1.10.339
in closure’s i18n module with :optimizations :none
via shadow-cljs
:
Uncaught SyntaxError: Invalid regular expression: /[Ö'-Û¯Ûº-ࣿâ€�-��-�ï¬-ï·¿ï¹°-ﻼ]/: Range out of order in character class
which seems to be erroring on the line:
goog.i18n.bidi.rtlChars_ = "֑-ۯۺ-ࣿ\ud802-\ud803\ud83a-\ud83b" + "יִ-﷿ﹰ-ﻼ";
anyone seen anything like this before? kind of at a loss for how to debug or move forwardHi guys! I'm trying to update cljsjs/react-popper
to the latest version. In order to do so I'm following the instructions at https://github.com/cljsjs/packages/wiki/Updating-packages.
Right now I'm stuck at the 'Update externs' part. As a first step I'm trying to reproduce the current react-popper.ext.js
before updating any versions, but seems I'm missing something. I'm using http://jmmk.github.io/javascript-externs-generator like this:
curl -O
curl -O
curl -O
curl -O
curl -O
generate-extern -f react.production.min.js,react-dom.production.min.js,prop-types.js,popper.js,index.umd.js -n ReactPopper -o test-extern.js
But comparing the resulting file against react-popper.ext.js
mine is missing some parts:
/**********************************************************************
* Extern for ReactPopper
* Generated by
**********************************************************************/
var ReactPopper = {
"Manager": function () {},
"Popper": function () {},
"Reference": function () {},
"placements": {}
};
ReactPopper.Manager.prototype = {
"forceUpdate": function () {},
"isReactComponent": function () {},
"render": function () {},
"setState": function () {}
};
/**********************************************************************
* End Generated Extern for ReactPopper
/**********************************************************************/
Any idea what I'm doing wrong?@mss @thheller That’s odd timing. This error reported about the Regular expression is nearly the same line I just mentioned today in my question here https://clojurians.slack.com/archives/C03S1L9DN/p1554817407239700
The line I pasted with the error included this new RegExp("["+goog.i18n.bidi.rtlChars_+"]")
which is probably where the error comes up.
And Thomas’s suggestion solved it.
I also was only seeing it on “newer” cljs versions (didn’t see it in 1.7, do see it in 1.9 & 1.10 that I’ve checked). Not sure why. I guess google closure updates introduced this (assuming, haven’t investigated that track).
has anyone encountered this issue?
https://github.com/drapanjanas/re-natal/issues/220
generating debug apk undefined is not a valid argument for 'in' (evaluating 'StopIteration' in goog.global)
src code is here https://github.com/StankovicMarko/producer
and i've used this steps to generate apk https://github.com/StankovicMarko/producer#tips
Does anyone have any insights?
Btw app works on emulator perfectly
I would like some help to use cljs.analyzer
in cljs. I can find good online resources for clojure but not clojurescript.
My goal is to walk through the AST of all functions of a namespace.
Would be nice to be able to use tools.analyzer.ast.query
as I've seen Nicola Mometto mentioning that it's environment agnostic.