joaoraf / kiama

Automatically exported from code.google.com/p/kiama
GNU Lesser General Public License v3.0
7 stars 2 forks source link

Please don't package examples in the main jar #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build the project
2. Look at what's in the main jar :)

What is the expected output? What do you see instead?

The examples shouldn't be in the distributed jar; they have lots of classes 
that have similar or identical names to users' AST nodes.

What version of the product are you using? On what operating system?
1.0.0.a1 (trunk as of a couple days ago)

Original issue reported on code.google.com by alex%clu...@gtempaccount.com on 14 Apr 2010 at 10:33

GoogleCodeExporter commented 9 years ago
I agree that moving the examples to a separate jar is a good idea and had been 
planning to do it at some stage.  
We will try to do it for 1.0.0.

BTW, what was the exact problem you were having?  I would have thought that the 
fact that the examples are in 
org.kiama... packages would have meant that the class names could not clash 
with names declared in user code. 
Unless you are importing the example names for some reason, but then you know 
that you are doing it.  Can you 
clarify this for me?

Original comment by inkytonik on 16 Apr 2010 at 5:29

GoogleCodeExporter commented 9 years ago
No real problem, it's just that there are a few places where there's 
effectively a 
flat namespace for classes (e.g. Ctrl-N in IDEA or the equivalent "Go to type" 
in 
Eclipse)

Original comment by alex%clu...@gtempaccount.com on 16 Apr 2010 at 5:44

GoogleCodeExporter commented 9 years ago
Ah, right.  That makes some sense.  Thx.

Original comment by inkytonik on 16 Apr 2010 at 5:46

GoogleCodeExporter commented 9 years ago
revision d3217976bd: The examples are now packaged with the tests (which they 
really are). This changes the 
behaviour of the run command, since the library now has no main at all.  Use 
the "main" action to run examples; 
it now uses the test classpath instead of the run one.  Also, a side-effect of 
this change is that the examples no 
longer appear in the scaladoc for the library, which seems appropriate too, if 
a bit less convenient.

Original comment by inkytonik on 7 May 2010 at 5:23