[CLJCLR-22] Reflector/InvokeConstructor should handle default c-tor for value types Created: 18/May/13 Updated: 18/May/13 Resolved: 18/May/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Only found when eval'ing. (defn f [] (new DateTime)) ; works Eval of NewExpression calls Reflector/InvokeConstructor, which does not handle the default c-tor for value types. |
| Comments |
| Comment by David Miller [ 18/May/13 10:23 PM ] |
|
Special case in Reflector/InvokeConstructor for no infos found, type is Value type, zero args. |
[CLJCLR-21] Improper code gen for (new valuetype) Created: 18/May/13 Updated: 18/May/13 Resolved: 18/May/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
(new DateTime) throws with badprogramexception |
| Comments |
| Comment by David Miller [ 18/May/13 5:38 PM ] |
|
Missing a ldloc instruction. |
[CLJCLR-20] Allow (optional) signing of Clojure.dll. Created: 11/May/13 Updated: 11/May/13 Resolved: 11/May/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Major |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Needed in order to allow the ilmerge command in build.proj to work properly. <PropertyGroup> |
[CLJCLR-19] Enhance path probing for load to include the same folder as Clojure.dll Created: 16/Apr/13 Updated: 05/May/13 Resolved: 05/May/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Minor |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
From Devin Garner: ... adding this line to GetFindFilePathsRaw in RT.cs ? static IEnumerable<string> GetFindFilePathsRaw() { yield return Path.GetDirectoryName(typeof(RT).Assembly.Location); // new line }Since RT is inside Clojure.dll, it will allow any file in the same folder as Clojure.dll to be found. The specific instance I found a need of this was an app that referenced Clojure.dll but the .exe was in a different folder than Cloure.dll. Somehow the .exe new where to find Clojure.dll, but nothing else. |
| Comments |
| Comment by David Miller [ 05/May/13 8:58 AM ] |
|
Added path to RT.GetFindFilePathsRaw. |
[CLJCLR-17] In JVM, clojure.core/bigdec can take a string. Not so in CLR. Created: 30/Mar/13 Updated: 05/May/13 Resolved: 05/May/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
java.math.BigDecimal has a c-tor overload that takes a string argument. |
| Comments |
| Comment by David Miller [ 05/May/13 8:53 AM ] |
|
Added additional c-tors to clojure.lang.BigDecimal. |
[CLJCLR-18] core/load-reader invokes Compilr.load with wrong # of args Created: 16/Apr/13 Updated: 05/May/13 Resolved: 05/May/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Submitted by Devin Garner (defn load-reader //in Compiler.cs |
| Comments |
| Comment by David Miller [ 05/May/13 8:37 AM ] |
|
Added overload of Compiler.load. |
[CLJCLR-13] Add namespace DescriptionAttribute to init type Created: 06/Mar/13 Updated: 27/Mar/13 Resolved: 27/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Minor |
| Reporter: | Aaron Craelius | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Code |
| Description |
|
leiningen on the JVM uses a small library called bultitude to search the classpath for namespaces. To acheive the same functionality in ClojureCLR we would need to add some descriptive information to the compiler generated _Init_$. I'm suggesting adding a System.ComponentModel.DescriptionAttribute with a clojure readable string of information describing what namespace(s) this init type loads. This would allow someone to query all the loaded assemblies for namespaces, without necessarily trying to load all of them. Oftentimes the namespace itself is slightly different than what the init type would imply - for instance _Init_$clojure/pprint/column_writer is for the namespace clojure.pprint. The attached patch, adds a DescriptionAttribute based on the final value of RT.CurrentNSVar after compiling. Conceivably, a single file could load several namespaces, but this seems like a rare case - it could be handled, however, by adding a watch to RT.CurrentNSVar. If this seems useful, the patch can be modified to use this method. |
| Comments |
| Comment by David Miller [ 27/Mar/13 9:40 PM ] |
|
https://github.com/clojure/clojure-clr/commit/01b46505ac902e3a1ad2167ad0b0e0689d45f716 |
[CLJCLR-12] Add AssemblyName overload to GenContext Created: 05/Mar/13 Updated: 27/Mar/13 Resolved: 27/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Minor |
| Reporter: | Aaron Craelius | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Code |
| Description |
|
In order to create signed assemblies using GenContext, we need to be able to pass it an AssemblyName parameter. This enables us to set KeyPair as well as other useful properties such as Version and Culture of AssemblyName. The attached patch changes the constructor and adds another overload to CreateWithExternalAssembly - maybe a little messy, but the best I could think of. |
| Comments |
| Comment by David Miller [ 27/Mar/13 9:19 PM ] |
|
https://github.com/clojure/clojure-clr/commit/3da1f6e217fca951011d56524541de431b853250 |
[CLJCLR-16] Compiler.TryLoadInitType should not catch AssemblyInitializationException Created: 25/Mar/13 Updated: 27/Mar/13 Resolved: 27/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
From AaronC: |
| Comments |
| Comment by David Miller [ 27/Mar/13 8:54 PM ] |
|
https://github.com/clojure/clojure-clr/commit/857731c3e1e689860a50b62bd734318600855f5e |
[CLJCLR-10] Errors when requiring a namespace do not contain useful stacktrace Created: 03/Mar/13 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: | Minor |
| Reporter: | Aaron Craelius | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When a namespace fails to load, a stack trace for just the require/load itself is shown - the actual cause is wrapped and hard to uncover. Putting a println statement in the catch clause of clojure.core/load-lib is one possible fix for this, but then two stack traces are displayed. Still, this may be worthwhile because debugging these errors can be a headache. |
| Comments |
| Comment by David Miller [ 12/Mar/13 11:33 PM ] |
|
The changes to make the loading code throw exceptions rather than catch exceptions and return status codes ( https://github.com/clojure/clojure-clr/commit/e6febd45d53c983d696b83de62cf794be1d165aa ) should have made Exceptions during loading accessible further down the stack (i.e., the REPL). |
[CLJCLR-9] Need better error message for clojure.core/cast Created: 03/Mar/13 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: | Minor |
| Reporter: | Aaron Craelius | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Code |
| Description |
|
InvalidCastException provides no information on the type that was trying to be cast. |
| Comments |
| Comment by David Miller [ 12/Mar/13 5:09 PM ] |
|
Commit 6cdde07 |
[CLJCLR-4] Error running recursion example from Created: 13/Jul/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: | Minor |
| Reporter: | Andrew Myers | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 7, 64 bit |
||
| Attachments: |
|
| Description |
|
The "factorial-1" example from Mark Volkmann's tutorial gives an error when run on ClojureCLR. The error is shown below: c:\cljdev\clojure-clr-1.4.0-Debug-4.0\Debug 4.0>Clojure.Main.exe c:\users\amyers Unhandled Exception: System.MissingMethodException: Cannot find member box match |
| Comments |
| Comment by David Miller [ 12/Mar/13 4:45 PM ] |
|
Fixed in commit ead2496 Missing definition for RT.box. |
[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. |
[CLJCLR-3] Clojure.Compile treats compile path of "." as the Clojure install path Created: 16/May/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: | Neal Groothuis | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
ClojureCLR 1.3.0 on Windows 7. |
||
| Description |
|
When I run Clojure.Compile.exe on a .clj file in the current directory, it claims that it is "Compiling program to .", but no assemblies appear. After a bit of searching, I discovered that the output assemblies are being dropped into the directory containing Clojure.Compile.exe! (This is a duplicate of https://github.com/richhickey/clojure-clr/issues/55, but it's unclear whether we should report things here or there.) |
| Comments |
| Comment by Neal Groothuis [ 16/May/12 4:36 PM ] |
|
Ah-ha: it appears that this is a duplicate of https://github.com/richhickey/clojure-clr/issues/52, and the behavior was changed in e002ef3. However, it still appears to be at odds with the desired behavior noted at http://clojureclr.blogspot.com/2012/01/compiling-and-loading-in-clojureclr.html; i.e., *compile-path* is still being ignored. |
| Comment by David Miller [ 12/Mar/13 8:26 AM ] |
|
This was fixed in https://github.com/clojure/clojure-clr/commit/4e4c64ba42bfc45c3062771109cd36ae57a1cc4f back in January, 2012. |
[CLJCLR-15] Protected internal methods are not considered for overriding. Created: 10/Mar/13 Updated: 11/Mar/13 Resolved: 11/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Protected internal methods are not considered for overriding in NewInstanceExpr and GenClass. |
| Comments |
| Comment by David Miller [ 11/Mar/13 10:41 PM ] |
|
Fixed in commit 201d83c |
[CLJCLR-14] ASP.NET apps cannot find .clj and .clj.dll files Created: 10/Mar/13 Updated: 11/Mar/13 Resolved: 11/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | David Miller | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
For ASP.NET applications, the search path for .clj and .clj.dll files needs to include CurrentDomain.BaseDirectory and its 'bin' subdirectory. |
| Comments |
| Comment by David Miller [ 11/Mar/13 10:15 PM ] |
|
Fixed in commit 52d58d5 |
[CLJCLR-2] (System.Environment.SpecialFolder/Personal) ;Return: CompilerException System.InvalidOperationException: Unable to find static field: Personal Created: 28/Feb/12 Updated: 06/Mar/13 Resolved: 06/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Alex Woods | Assignee: | David Miller |
| Resolution: | Declined | Votes: | 0 |
| Labels: | .net4.0, 1.3, Clojure-clr, System.Environment.SpecialFolder/Personal | ||
| Environment: |
Clojure-clr 1.3 .net 4.0 |
||
| Description |
|
(import [System.Environment.SpecialFolder]) ;return nil |
| Comments |
| Comment by David Miller [ 06/Mar/13 10:03 PM ] |
|
SpecialFolder is a nested class of Environment. The actual name is System.Environment+SpecialFolder: user=> (import '[System Environment+SpecialFolder]) It would be nice to have a way to provide an alias, but that's not in Clojure's namespace semantics at the moment. |
[CLJCLR-8] Enhance compiler support for loading namespace from .NET assemblies Created: 28/Feb/13 Updated: 06/Mar/13 Resolved: 06/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Major |
| Reporter: | Aaron Craelius | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Code |
| Description |
|
This patch adds support for: 1) Loading .clj files from .NET assemblies as embedded resources. 2) AOT compiling multiple Clojure namespaces into a single .NET assembly. To do this the _Init_ class name has to be unique for each assembly. Actual compilation of multiple namespaces into .DLL's would be done by a separate tool such as ILMerge or nleinigen. 3) Loading a clojure namespace from a custom path other than that specified by its namespace. This is useful for loading .clj files at the repl that are being integrated into existing .NET projects as embedded resources. For example say my namespace is MyCompany.MyProject.MyNamespace and I want to integrate it into the C# project MyProject as an embedded resource. I create the file SolutionFolder\MyProject\MyNamespace.clj on the disk. As long as the default namespace for MyProject is MyCompany.MyProject, the file will actually be stored as an embedded resource with the path Clojure expects (MyCompany.MyProject.MyNamespace.clj). But, from the repl, we need to tell Clojure to load namespaces beginning with MyCompany.MyProject from SolutionFolder\MyProject. The function add-ns-load-mapping (whose name I'm not attached to) does this. |
| Comments |
| Comment by David Miller [ 06/Mar/13 9:25 PM ] |
|
https://github.com/clojure/clojure-clr/commit/4aa53b70e40dcc8c92f026615ce4aa86c02c71ee |
[CLJCLR-11] Simplify integration of Clojure code with existing .NET code Created: 03/Mar/13 Updated: 06/Mar/13 |
|
| Status: | Open |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Minor |
| Reporter: | Aaron Craelius | Assignee: | David Miller |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Code |
| Description |
|
It would be nice to have a nice high-level wrapper class for key Clojure integration functions. In IronPython for example, there is a IronPython.Hosting.Python class. For ClojureCLR, I created the attached clojure.lang.Hosting.Clojure class which provides three simple functions Require, GetVar, and AddNamespaceLoadMapping (for integrating .clj files into .NET assemblies as embedded resources). This class or one like it is a simple suggestion to make integration with existing code as painless as possible. Sample usage: Clojure.GetVar("clojure.main", "main").invoke(); // Starts an embedded Clojure REPL This is much simpler than: Symbol CLOJURE_MAIN = Symbol.intern("clojure.main"); |
| Comments |
| Comment by Aaron Craelius [ 06/Mar/13 8:42 PM ] |
|
This is an updated patch that supercedes the previous patch adds an AddToLoadPath method. |
[CLJCLR-6] "protocols.clj:139 - call to aget can't be resolved." warnings when running REPL Created: 20/Feb/13 Updated: 03/Mar/13 Resolved: 03/Mar/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Minor |
| Reporter: | Frank Hale | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 7 x64, .NET 4.5, Clojure-CLR 1.4.1 |
||
| Attachments: |
|
| Description |
|
I've compiled the Clojure-CLR-1.4.1 code from the Github repository using the 'Release' configuration. When I run the REPL I get a lot of duplicated warnings. I've pasted the warnings below. C:\Users\Frank.Hale\Desktop\clojure-clr-1.4.1>Clojure.Main.exe |
| Comments |
| Comment by Frank Hale [ 20/Feb/13 3:48 PM ] |
|
I compiled from the Clojure-CLR 1.4.1 branch in 'Release' mode and then copied the binaries out to a directory and opened a terminal there to run the REPL. The warnings show before I can type in the REPL. |
| Comment by David Miller [ 20/Feb/13 3:53 PM ] |
|
Can you send a directory listing? Also, look at the Clojure 1.4.1 zip at https://github.com/clojure/clojure-clr/downloads and compare the list of dlls. There should be a clojure.core.protocols.clj.dll. |
| Comment by Frank Hale [ 20/Feb/13 4:05 PM ] |
|
Okay I have clojure.core.protocols.clj.dll in my build. I downloaded the 1.4.1 Debug build from https://github.com/clojure/clojure-clr/downloads and it gives me the same warnings. |
| Comment by Frank Hale [ 20/Feb/13 4:26 PM ] |
|
FWIW, I've attached the file listing of the 1.4.1 release build I made. |
| Comment by David Miller [ 20/Feb/13 5:09 PM ] |
|
My new guess is timestamps. |
| Comment by Frank Hale [ 23/Feb/13 8:42 AM ] |
|
This is reproducable on 2 computers that I use. I'm going to close this because the 1.5.x branch does not do this. I'll just move to 1.5 branch instead. |
| Comment by Frank Hale [ 27/Feb/13 9:21 AM ] |
|
This can be closed if you want. |
| Comment by David Miller [ 03/Mar/13 10:05 PM ] |
|
Will do. |
| Comment by David Miller [ 03/Mar/13 10:05 PM ] |
|
Reporter indicates this is not a problem in 1.5RC. No intention to revisit this in 1.4.1. |
[CLJCLR-7] HostExpr does not support IntPtr and UIntPtr Created: 28/Feb/13 Updated: 28/Feb/13 Resolved: 28/Feb/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Aaron Craelius | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Code |
| Description |
|
This patch adds missing support for IntPtr and UIntPtr to HostExpr so that interaction with Native code via P/Invoke can be fully supported. This is a hand modified squashed diff, so please use git apply rather than git am to apply it. |
| Comments |
| Comment by David Miller [ 28/Feb/13 10:20 PM ] |
|
Patch applied. |
[CLJCLR-1] Support Mono as a target platform Created: 11/Jan/12 Updated: 24/Jan/13 Resolved: 24/Jan/13 |
|
| Status: | Resolved |
| Project: | ClojureCLR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Minor |
| Reporter: | Shantanu Kumar | Assignee: | David Miller |
| Resolution: | Completed | Votes: | 1 |
| Labels: | mono | ||
| Environment: |
Mono 2.10.8.1 on 64-bit Mac OS X (Lion) |
||
| Description |
|
I tried out the Clojure-CLR binary for .NET 4.0 on Mono 2.10.8.1 on 64-bit Mac OS X (Lion) and it seems to work for the basic things on the REPL. Please consider releasing a binary for Mono, or mention in the README if the existing binaries are supposed to work on Mono. |