[CLJCLR-5] Global vars set! by the init script is reset to original state by Clojure.Main.exe Created: 16/Dec/12 Updated: 12/Mar/13 Resolved: 12/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Shantanu Kumar | Assignee: | David Miller |
| Resolution: | Declined | Votes: | 0 |
| Labels: | None | ||
| Environment: |
.NET 4.0 Clojure 1.4.0 on Windows 7 |
||
| Description |
|
I start the repl and run my ClojureCLR as follows: Clojure.Main.exe -i initscript -r Clojure.Main.exe -i initscript -m foo.core The file initscript looks like this: (set! *warn-on-reflection* true)
The value set in the initscript is not carried over to the repl or run session. When I embed the line (set! *warn-on-reflection* true)
|
| Comments |
| Comment by David Miller [ 12/Mar/13 8:36 AM ] |
|
This behavior comes from the JVM version of Clojure. Request for change should happen there. This happens because the initialization is done by a call to Compiler.loadFile, which calls Compiler.load which establishes its own binding for warn-on-reflection, that binding disappearing when the initialization is complete. |