<< Back to previous view

[CLJS-829] :emit-constants Keywords are emitted without hash value Created: 29/Jul/14  Updated: 29/Jul/14  Resolved: 29/Jul/14

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Trivial
Reporter: Thomas Heller Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Attachments: File emits-keyword.diff    
Patch: Code

 Description   

The cljs.compiler emits keywords as new cljs.core.Keyword(ns, name, str, hash) except when using :emit-constants which will emit new cljs.core.Keyword(ns, name, str).

The reason is a bit of duplicate code, the patch creates a new function emits-keyword which is then used in both places.

See:
https://github.com/clojure/clojurescript/blob/f0dcc75573a42758f8c39b57d1747a2b4967327e/src/clj/cljs/compiler.clj#L204
https://github.com/clojure/clojurescript/blob/f0dcc75573a42758f8c39b57d1747a2b4967327e/src/clj/cljs/compiler.clj#L1080



 Comments   
Comment by David Nolen [ 29/Jul/14 1:45 PM ]

fixed https://github.com/clojure/clojurescript/commit/ce8688c8aedce73f03de05ed6f290e00bc4f7ccf





[CLJS-822] "TypeError: invalid 'in' operand a" Created: 05/Jul/14  Updated: 29/Jul/14  Resolved: 29/Jul/14

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Zack Piper Assignee: Unassigned
Resolution: Not Reproducible Votes: 0
Labels: clojure.browser.repl, javascript
Environment:

Source: http://github.com/zackp30/crateincinerator
OS: Linux openSUSE 13.1, Bottle
Browser: Firefox 25.0



 Description   

When using `clojure.browser.repl` in a ClojureScript project, the evaluation fails due to the error `TypeError: invalid 'in' operand a @ http://127.0.0.1:3000/js/site.js:6559`
Source of line:
`if (d in a && !/^https?:\/\//.test(a[d])) {`
^ fails here, definitely syntax error.

Sorry if I have put this in completely the wrong place...

Thanks!



 Comments   
Comment by David Nolen [ 16/Jul/14 4:33 PM ]

This ticket need more information - complete simple steps to reproduce with no external dependencies beyond ClojureScript, thanks.

Comment by Zack Piper [ 28/Jul/14 8:06 AM ]

Wow, sorry for this, but it now works. I couldn't reproduce the error in this ticket, however, I got one ([14:05:57.342] TypeError: parentElm is null @ http://localhost:3000/js/main.js:33501), indicating that it was initializing before the document was ready (I blame JavaScript), so I put it at the bottom of the file, and bam, fixed.
Again, sorry.
Thanks!





[CLJS-828] Rhino support broken with new google-closure library Created: 25/Jul/14  Updated: 25/Jul/14  Resolved: 25/Jul/14

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Daniel Skarda Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Environment:

org.clojure/clojurescript "0.0-2268"
org.clojure/google-closure-library "0.0-20140226-71326067"



 Description   

cljs.repl.rhino/repl-env reads two files: goog/base.js and goog/deps.js. Unfortunatelly both are deprecated and empty in the latest version of google-closure-library.

Rhino ends with message:

org.mozilla.javascript.EcmaError: ReferenceError: "goog" is not defined. (bootjs#1)

Startup code has to be updated to reflect these changes.

goog/base.js
// This is a dummy file to trick genjsdeps into doing the right thing.
// TODO(nicksantos): fix this
goog/deps.js
/**
 * @deprecated This file is deprecated. The contents have been
 * migrated to the main deps.js instead (which is auto-included by
 * base.js).  Please do not add new dependencies here.
 */


 Comments   
Comment by Daniel Skarda [ 25/Jul/14 6:37 AM ]

Ups. It seems I have not been investigating the issue enough.

The problem is probably related to #826. Google Closure Library contains correct files, but it is google-closure-third-party which contains dummy files. I will investigate if the patch from #826 closes the issue with Rhino as well.

Comment by Daniel Skarda [ 25/Jul/14 7:21 AM ]

Confirmed. I deleted the files and Rhino works again (and cljs-nashorn as well). Please release the fix for #826 soon.

Comment by David Nolen [ 25/Jul/14 1:29 PM ]

Cutting a release today





Generated at Wed Jul 30 00:28:58 CDT 2014 using JIRA 4.4#649-r158309.