Erweiterte Problemanzeige
140 [Bisect] general Blocker immer 2018-02-16 15:23 2018-02-16 15:49
rixed  
 
normal  
neu 1.3  
offen  
keine    
keine  
Bisect does not compile under ocaml >= 4.6.0
Probably due to non-mutable strings
Note that I haven't tested this myself, just reporting what I've seen on github.
See for instance: https://github.com/ocaml-batteries-team/batteries-included/issues/835 [^]
Notiz
(0000289)
rixed   
2018-02-16 15:49   
FWIW:

diff -rN -u old-bisect.x9c.fr/src/library/common.ml new-bisect.x9c.fr/src/library/common.ml
--- old-bisect.x9c.fr/src/library/common.ml 2018-02-16 16:48:07.000000000 +0100
+++ new-bisect.x9c.fr/src/library/common.ml 2018-02-16 16:48:07.000000000 +0100
@@ -159,10 +159,10 @@
 
 let check_channel channel filename magic check_digest =
   let magic_length = String.length magic in
- let file_magic = String.create magic_length in
+ let file_magic = Bytes.create magic_length in
   really_input channel file_magic 0 magic_length;
   let file_version =
- if file_magic = magic then
+ if Bytes.to_string file_magic = magic then
       let file_version : (int * int) = input_value channel in
       if not (List.mem file_version supported_versions) then
         raise (Unsupported_version filename)




Erweiterte Problemanzeige
109 [Bisect] general kleinerer Fehler nicht getestet 2012-12-03 11:14 2017-04-08 00:04
esther  
 
normal  
neu  
offen  
keine    
keine  
Makefile should use PROJECT_NAME variable everywhere it is needed
PROJECT_NAME variable (instantiated to "bisect") is used in the Makefile but there are places where it is not used whereas it should be.

Line 28, 83, 85, 87.
Notiz
(0000263)
esther   
2012-12-03 11:15   
This is a very minor issue but I thought it should be reported.
(0000288)
travm1   
2017-04-08 00:04   
More info about Makefiles: https://www.everipedia.com/Makefile/ [^]




Erweiterte Problemanzeige
139 [Kaputt] general kleinerer Fehler immer 2016-12-21 00:58 2016-12-21 00:58
Bergi  
 
normal  
neu  
offen  
keine    
keine  
Kaputt should check all specifications not only the first
The docs say (and the code confirms)

| When checking if the function matches its specification,
| Kaputt will determine the first precondition from the list
| that holds, and ensure that the corresponding postcondition
| holds: if not, a counterexample has been found.

This is not helpful in my standard usage. I've got multiple postconditions that I want to test, some of them with preconditions because they don't apply to every test case.
I would rather have all the implications in the list checked on every test run.

Or maybe I'm doing something wrong here, and I should rather use multiple tests for this?
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
138 [Bolt] general kleinerer Fehler immer 2016-12-02 08:36 2016-12-02 08:36
vzaliva  
 
normal  
neu 1.4  
offen  
keine    
keine  
no CMX found
*** omake: reading OMakefiles
*** omake: finished reading OMakefiles (0.01 sec)
- build . EcobeeCollector.cmx
+ ocamlfind ocamlopt -syntax camlp4o -package getopt,yojson,bolt,netclient -I . -c EcobeeCollector.ml
Warning 58: no cmx file was found in path for module Bolt, and its interface was not compiled with -opaque

ocaml 4.03.0. Bolt installed via OPAM.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
137 [Bisect] general kleinerer Fehler immer 2016-08-12 17:44 2016-08-12 17:44
leonidr  
 
normal  
neu 1.2  
offen  
keine    
keine  
Installing Kaputt on "brewed" systems
As described in this patch https://github.com/ocaml/opam-repository/pull/7176. [^]

The configuration/Make of kaputt relies on ocamlbuild and ocamlopt being in the same directory, which isn't always true.

Perhaps applying the patch is satisfactory.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
136 [Bolt] general Blocker immer 2015-09-27 23:54 2015-09-28 21:27
vzaliva  
 
normal  
neu 1.4  
offen  
keine    
keine  
OPAM install under MacOS fails
$ opam install bolt
The following actions will be performed:
  ? install bolt 1.4

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ????
[bolt] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ????
[ERROR] The compilation of bolt failed at "make all".
Processing 1/1: [bolt: ocamlfind remove]
#=== ERROR while installing bolt.1.4 ==========================================#
# opam-version 1.2.2
# os darwin
# command make all
# path /Users/lord/.opam/system/build/bolt.1.4
# compiler system (4.02.2)
# exit-code 2
# env-file /Users/lord/.opam/system/build/bolt.1.4/bolt-1216-d0f245.env
# stdout-file /Users/lord/.opam/system/build/bolt.1.4/bolt-1216-d0f245.out
# stderr-file /Users/lord/.opam/system/build/bolt.1.4/bolt-1216-d0f245.err
### stdout ###
# [...]
# File "_tags", line 27, characters 19-27:
# Warning: the tag "warnings" is not used in any flag or dependency declaration, so it will have no effect; it may be a typo. Otherwise you can use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
# /opt/local/bin/ocamldep.opt -pp /opt/local/bin/camlp4of -modules src/syntax/bolt_pp.ml > src/syntax/bolt_pp.ml.depends
# + /opt/local/bin/ocamldep.opt -pp /opt/local/bin/camlp4of -modules src/syntax/bolt_pp.ml > src/syntax/bolt_pp.ml.depends
# sh: /opt/local/bin/camlp4of: No such file or directory
# File "src/syntax/bolt_pp.ml", line 1:
# Error: Error while running external preprocessor
# Command line: /opt/local/bin/camlp4of 'src/syntax/bolt_pp.ml' > /var/folders/hh/h6kt24208xj44z0059_xd9rh0000gs/T/ocamlppf1332b
#
# Command exited with code 2.
### stderr ###
# make: *** [all] Error 10



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ????
The following actions failed
  ? install bolt 1.4
No changes have been performed
I also filed bug report here: https://github.com/ocaml/opam-repository/issues/4863 [^]
Notiz
(0000287)
vzaliva   
2015-09-28 21:27   
it was system ocaml installation issue, now resolved.




Erweiterte Problemanzeige
135 [Kaputt] general Feature-Wunsch N/A 2015-07-03 03:08 2015-07-03 03:08
jkloos  
 
normal  
neu 1.2  
offen  
keine    
keine  
More configurability of test outputs
would it be possible to make test outputs a bit more configurable?
Ideally, I'd like to see the following two features:
- A mode in which successful tests are not printed, so you only see the failed tests.
- Some way to control the output mode via command line/environment variables.

Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
134 [Kaputt] general Fehler im Text immer 2015-05-26 16:04 2015-05-26 16:04
Laurent  
 
normal  
neu 1.2  
offen  
keine    
keine  
Typo in the reference manual (Argot instead of Kaputt)
page 3, Chapter 2,section 2.2

The fisrt sentence begins with "The configuration of Argot ...."

Should be Kaputt instead of Argot
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
133 [Bisect] general kleinerer Fehler manchmal 2015-03-10 16:34 2015-03-10 16:34
dsheets  
 
normal  
neu 1.4  
offen  
keine    
keine  
Runtime.file_channel is not atomic
If multiple bisects are running in parallel, they can race and multiply attempt to use the same output channel. Bisect should use O_CREAT and O_EXCL to ensure that it atomically creates an output channel.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
132 [Bolt] general Unschönheit immer 2015-02-28 00:52 2015-02-28 00:52
damien  
 
normal  
neu 1.4  
offen  
keine    
keine  
fichiers temporaires pas nettoyes
A chaque fois que je compile Bolt, il cree dans /tmp quelques fichiers `versionXXXXXX.ml` qui ne sont pas supprimes a la fin.

Le meme probleme se produit avec Argot, Bisect, Kaputt et Mascot.

Je propose ce patch qui resoud le probleme:

diff -r -u bolt-1.4.orig/myocamlbuild.ml bolt-1.4/myocamlbuild.ml
--- bolt-1.4.orig/myocamlbuild.ml 2012-10-26 15:19:41.000000000 -0400
+++ bolt-1.4/myocamlbuild.ml 2015-02-27 18:06:55.011585130 -0500
@@ -64,7 +64,7 @@
     let dir = Pathname.dirname dst in
     let cmd = Printf.sprintf "mkdir -p %s" (Pathname.to_string dir) in
     if Sys.command cmd <> 0 then failwith ("cannot run " ^ cmd);
- cp src dst in
+ mv src dst in
   dispatch begin function
     | After_rules ->
         let camlp4of =

Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
131 [Bolt] general kleinerer Fehler nicht getestet 2015-02-22 16:17 2015-02-22 16:17
jll  
 
normal  
neu 1.4  
offen  
keine    
keine  
missing camlp4of
It seems that on Ubuntu, bolt requires camlp4-extra to be installed, but the configure file does not detect that this is not the case, in particular that camlp4of is not available.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
130 [Bisect] general schwerer Fehler immer 2015-02-13 00:05 2015-02-13 00:05
leonidr  
 
normal  
neu 1.3  
offen  
keine    
keine  
Can't compile ppx version:
$ cat Makefile.config
# timestamp: Thu Feb 12 17:55:03 EST 2015
PATH_OCAML_PREFIX=/Users/leonidrozenberg/.opam/4.02.0
PATH_OCAMLFIND=/Users/leonidrozenberg/.opam/4.02.0/bin/ocamlfind
NATIVE_DYNLINK=TRUE
WARNINGS=FALSE
NO_CAMLP4=FALSE
PPX=TRUE
MAKE_QUIET=--no-print-directory
$ make all
........

File "src/syntax/ast_mapper.ml", line 19, characters 36-67:
Error: Some record fields are undefined: ptyp_attributes
Command exited with code 2.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
129 [Mascot] general Fehler im Text N/A 2014-06-14 22:02 2014-06-14 22:02
ptroja  
 
normal  
neu  
offen  
keine    
keine  
Documentation source file is missing
I wanted to fix some typos in the documentation, but the "mascot.tex" source file, from which the HTML and PDF outputs are produced, is not included in the Mascot repository.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
128 [Mascot] general kleinerer Fehler N/A 2014-06-14 21:51 2014-06-14 21:51
ptroja  
 
normal  
neu  
offen  
keine    
keine  
Mascot vel Argot - naming in the documentaion
Section 2.2 of the Mascot manual starts with the sentence: "The configuration of Argot ..."

I think it is a copy-paste kind of mistake.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
127 [OCaml-Java] Absturz immer 2013-12-06 11:50 2014-01-28 22:09
nunogaspar  
xclerc  
normal  
erledigt 2.0-early-access6  
erledigt  
keine    
keine  
Wrappers generated with errors
I am able to successfully generate a Wrappers class, however when trying to compile it yields an error. For instance,

ocamlwrap Batteries.cmi Base.cmi
javac -cp PainlessLib.jar BaseWrapper.java
ocamlwrap Batteries.cmi Base.cmi Binding.cmi
javac -cp PainlessLib.jar BindingWrapper.java
ocamlwrap Batteries.cmi Base.cmi Binding.cmi Interface.cmi
javac -cp PainlessLib.jar InterfaceWrapper.java

yields

InterfaceWrapper.java:159: error: illegal start of type
    public static OCamlFunction2<interface, interface, OCamlBool> beq_interface$closure() {
                                 ^
InterfaceWrapper.java:159: error: <identifier> expected
    public static OCamlFunction2<interface, interface, OCamlBool> beq_interface$closure() {
                                          ^

....

100 errors

I am not sure how to reduce this problem for easy replication. In any case I send the involved files.
Notiz
(0000284)
xclerc   
2014-01-28 22:09   
ocamlwrap now "escapes" Java keywords.




Erweiterte Problemanzeige
126 [OCaml-Java] Absturz immer 2013-12-06 09:43 2014-01-28 22:08
nunogaspar  
xclerc  
normal  
erledigt 2.0-early-access6  
erledigt  
keine    
keine  
function arity is too large
Well, the error description is self-explanatory. It happens with ocamlwrap.

*** error: function arity is too large (arity is 7)

Bug or Feature?
My OCaml code is generated, so making my function take less arguments would not be a great solution for me..
Notiz
(0000283)
xclerc   
2014-01-28 22:08   
Maximum arity has been raised to 10.




Erweiterte Problemanzeige
125 [OCaml-Java] Blocker immer 2013-12-05 19:32 2014-01-28 22:08
nunogaspar  
xclerc  
normal  
erledigt 2.0-early-access6  
erledigt  
keine    
keine  
ocamlwrap error
ocamlwrap doesn't seem to handle very well sum types. The following minimalist code exemplifies the situation.

A.mli:
type abc =
  | ABC of char

type ident =
  char list * abc list

test.ml:
open A

type xyz =
  | Xyz of abc

with the commands:
ocamljava -c a.mli
ocamljava -c test.ml
ocamlwrap test.cmi

yield

*** error: Not_found




Work around already provided: invoke ocamlwrap with both .cmi files.
Notiz
(0000282)
xclerc   
2014-01-28 22:08   
A better error message is now output.




Erweiterte Problemanzeige
124 [Kaputt] general schwerer Fehler immer 2013-10-26 10:01 2013-10-26 10:08
jackyzhang  
 
normal  
neu 1.2  
offen  
keine    
keine  
fail to make tests in kaputt-1.2
After succsefully making all, I failed to make tests.
The platform informaton is as follows.
Ubuntu 10.04 LTS - the Lucid Lynx - released in April 2010 and supported until April 2013.
a@ubuntu:~/Desktop/kaputt-1.2$ make tests
test -f `pwd`/tests/Makefile && (cd `pwd`/tests && make --no-print-directory all && cd ..) || true
Running tests for 'assertion-based' (bytecode)...
Running tests for 'assertion-based' (native)...
File "source.ml", line 1:
Error: Cannot find file std_exit.cmx
make[3]: *** [compile] Error 2
make[2]: *** [one] Error 2
Running tests for 'enumerator-based' (bytecode)...
Running tests for 'enumerator-based' (native)...
File "source.ml", line 1:
Error: Cannot find file std_exit.cmx
make[3]: *** [compile] Error 2
make[2]: *** [one] Error 2
Running tests for 'generator-based' (bytecode)...
Running tests for 'generator-based' (native)...
File "source.ml", line 1:
Error: Cannot find file std_exit.cmx
make[3]: *** [compile] Error 2
make[2]: *** [one] Error 2
Running tests for 'outputs' (bytecode)...
Running tests for 'outputs' (native)...
File "source.ml", line 1:
Error: Cannot find file std_exit.cmx
make[3]: *** [compile] Error 2
make[2]: *** [one] Error 2
Running tests for 'preprocessor' (bytecode)...
Running tests for 'preprocessor' (native)...
File "/tmp/kaputtd18279.ml", line 1:
Error: Cannot find file std_exit.cmx
make[3]: *** [compile] Error 2
make[2]: *** [one] Error 2
Running tests for 'shell-based' (bytecode)...
Running tests for 'shell-based' (native)...
File "source.ml", line 1:
Error: Cannot find file std_exit.cmx
make[3]: *** [compile] Error 2
make[2]: *** [one] Error 2

12 error(s) in 12 test(s)
Notiz
(0000281)
jackyzhang   
2013-10-26 10:08   
(bearbeitet am: 2013-10-28 08:52)
P.S. VMWare7, OCaml version is 4.01.0





Erweiterte Problemanzeige
123 [Bolt] general kleinerer Fehler N/A 2013-09-30 13:04 2013-09-30 13:04
sylvain  
 
normal  
neu 1.4  
offen  
keine    
keine  
Version number incorrect in the source distribution
The version number in the source distribution for Bolt 1.4 (https://forge.ocamlcore.org/frs/download.php/1043/bolt-1.4.tar.gz) [^] is still set to 1.3 (in the META, VERSION, README, doc... files).
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
122 [Mascot] general kleinerer Fehler immer 2013-08-28 11:21 2013-08-28 11:21
ygrek  
 
normal  
neu 1.0  
offen  
keine    
keine  
order of outputs
Running
 mascot -summary - -text - -html checkstyle.html
outputs in the following order
reporting to "checkstyle.html" with output "html"...
reporting to "-" with output "summary"...
reporting to "-" with output "text"...

It would be more convenient if order of outputs followed the order of command-line options. So that I could get full text of errors and then the summary at the end. Looks like it is not possible to achieve with current behaviour.

Thanks for you work!
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
121 [Mascot] general kleinerer Fehler nicht getestet 2013-08-20 22:41 2013-08-23 10:00
gildor  
xclerc  
normal  
anerkannt  
offen  
keine    
keine  
What is the official darcs repository
Hi,

There is a repository on forge.ocamlcore.org and one on mascot.x9c.fr. I think the one on x9c.fr is more up to date, maybe just disable the one on forge.ocamlcore.org so that people won't be confused.
Notiz
(0000280)
xclerc   
2013-08-23 10:00   
You are right, the official one is the one on x9c.fr.
Originally, I intended to use forge.ocamlcore.org
as a mirror, but I did not kept it up to date.

Can you explain me how to delete the repository
on forge.ocamlcore.org? Feel free to delete it
yourself if you wish.




Erweiterte Problemanzeige
119 [Bisect] general kleinerer Fehler N/A 2013-06-29 02:34 2013-08-08 12:15
Marc Weber  
xclerc  
normal  
Rückmeldung  
offen  
keine    
keine  
What about adding a tracing feature?
gasche @irc.freenode.net was so kind telling me about bisect. I was able to adopt the code to make what I need: trace execution points in ocaml code.
So thanks for your nice template.

I'm creating this bug request to tell you that I think this feature could be useful to others. I don't know that much ocaml yet which is why I want to let you decide on whether to integrate it and which is the best way to do so:

http://mawercer.de/tmp/instr.ml [^]
(I've inlined some code and used revised syntax to have one simple file)

The important code change is in decorate_this_expr
Notiz
(0000277)
Marc Weber   
2013-06-29 02:35   
This is the code I talked about. I've stripped off everything I didn't need:

value decorate_this_expr e =
    let buf = Buffer.create 42 in
    let _loc = Ast.loc_of_expr e in
    let () = Format.bprintf buf "%a\n" Loc.dump _loc in
    let s = Buffer.contents buf in
    <:expr< let () = print_string $`str:s$ in $e$ >>;
(0000279)
xclerc   
2013-08-08 12:15   
This would be a very useful feature.

However, I tend to think that it would probably
belong to Bolt (logging tool).




Erweiterte Problemanzeige
82 [OCamlScripting] general schwerer Fehler immer 2011-09-22 03:00 2013-04-24 13:14
petarddd  
xclerc  
normal  
erledigt Cadmium 1.1 (after merge)  
erledigt  
keine    
keine  
Scripting Standalone has Camomile Dependency
I am trying to get the Ocaml ScriptingEngine work in a simple test application but running into a camomile dependency... All I have is the java app which simply calls the scripting engine as described in the documentation:

ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByExtension("ml");
CompiledScript script = ((Compilable) engine).compile("print_endline \"printing from ocaml\"");

I downloaded the latest ocamlrun-scripting-standalone.jar and put it on the classpath for the test application. When I run the app, I get this error message:
Fatal error: exception Sys_error("/usr/local/share/camomile/database/general_category.mar: java.io.IOException: file does not exist: .\usr\local\share\camomile\database\general_category.mar")
 
Is there any way to get around this dependency? I would ultimately want to package a complete jar file I can run on any machine and installing and configuring camomile separately will not be possible...
I am running a Windows 7 (32 bit) and using JRE 1.6
Notiz
(0000276)
xclerc   
2013-04-24 13:14   
fixed in 2.0-early-access5




Erweiterte Problemanzeige
118 [OCaml-Java] kleinerer Fehler immer 2013-03-08 20:54 2013-03-28 07:16
chambart  
xclerc  
normal  
erledigt 2.0-early-access3  
erledigt  
keine    
keine  
Sys.command should call a shell
For instance:

Sys.command "echo $PATH";;
$PATH
- : int = 0

That command should have been executed by the shell.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
117 [OCaml-Java] kleinerer Fehler nicht getestet 2013-03-08 20:35 2013-03-28 07:15
chambart  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Ocamlbuild is not provided
Is ocamlbuild using things not available on the jvm ?
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
102 [Cadmium] general schwerer Fehler immer 2012-07-27 20:00 2013-03-28 07:14
dobesv  
xclerc  
normal  
erledigt 1.4  
erledigt  
keine    
keine  
Reports OS as 'Unix' in Windows
In windows by default it will report the OS as 'Unix' even though it is running on a Windows environment.

This can cause some issues with path name calculations, among other things.
Notiz
(0000250)
dobesv   
2012-07-27 20:14   
It appears that this is "as documented"

So, perhaps this should be considered a feature request to either:

1) Allow OS to be set easily at runtime

2) Detect the OS at runtime
(0000251)
dobesv   
2012-07-27 20:22   
The logic behind this is that if the resulting jar file is to be distributed, the runtime operating system may be different from the compile-time operating system.

In my case I am trying to load the cafesterolMain class from Java code. One possible solution would be to allow cafesterolMain to take more parameters in its mainWithReturn, perhaps allowing one to override the NativeParameters object rather than have that one always hard-coded into the generated class file.
(0000275)
xclerc   
2013-03-28 07:14   
The OCaml-Java runtime now reports the actual OS, unless the
value is overridden through parameter.

In addition, the environment variable "OCAMLJAVA_VERSION"
can be used in order to detect whether the classical OCaml
version or its OCaml-Java variant is running.




Erweiterte Problemanzeige
115 [OCaml-Java] kleinerer Fehler immer 2013-01-30 23:45 2013-03-07 23:13
chambart  
xclerc  
normal  
erledigt 2.0-early-access  
erledigt  
keine    
keine  
ocaml cannot be used to execute .ml file
It is useful to call ocaml some_script.ml, but with
the provided windowed toplevel, it is not possible.
Would it be possible to have both the windowed toplevel
(renamed to something like ocaml_graphic) and the
command line one (named ocaml) ?

It would allow fewer changes to build systems.
Notiz
(0000270)
xclerc   
2013-02-01 15:57   
You are right, I will do so in next release.




Erweiterte Problemanzeige
114 [OCaml-Java] schwerer Fehler immer 2013-01-30 13:05 2013-03-07 23:12
jrrk100  
xclerc  
normal  
erledigt 2.0-early-access  
erledigt  
keine    
keine  
Error: Cannot compute stack frames
jk23@angcatlnxsrv10:~/ocamljava-2.0-early-access2$ ocamljava queens.ml
File "queens.ml", line 1:
Error: Cannot compute stack frames
(class "java.lang.Object" not found)
jk23@angcatlnxsrv10:~/ocamljava-2.0-early-access2$ ocamlc queens.ml
jk23@angcatlnxsrv10:~/ocamljava-2.0-early-access2$

The program came from here:

http://caml.inria.fr/pub/old_caml_site/Examples/oc/basics/queens.ml [^]

Platform was linux debian wheezy, JRE 1.7
Notiz
(0000264)
xclerc   
2013-01-30 18:36   
Usually, this happens when the JAVA_HOME environment variable
is not properly set. However, I only tested the distribution against
full JDKs, but not against mere JREs.

Could you check the value of the JAVA_HOME environment variable,
and also tell me whether you have a file with the path
$JAVA_HOME/lib/ct.sym ?
(0000269)
jrrk100   
2013-01-31 16:55   
You are correct, the compilation proceeds when JDK is used instead of JRE. lib/ct.sym is not present in the JRE. As far as runtime goes, the native executable solves the queens problem for an 8x8 board in 4ms. The java version, who knows - but a very long time.
(0000271)
xclerc   
2013-02-01 15:59   
I don't know yet if it will be possible to support bare JREs,
but will take a look at it.

Regarding "queens.ml", the bug in OCaml-Java is indeed
in the "read_int" primitive... the computation is never launched.
If modified to remove the interactive part, the program
exhibit decent performances.




Erweiterte Problemanzeige
113 [OCaml-Java] Absturz immer 2013-01-30 12:28 2013-03-07 23:12
chambart  
xclerc  
normal  
erledigt 2.0-early-access  
erledigt  
keine    
keine  
ocamllex fails on xml-light xml_lexer.mll
sources of xml-light are at:
http://godi-backup2.camlcity.org/godi-backup/xml-light-2.2.tar.gz [^]

when running ocamllex:
ocamllex xml_lexer.mll
Fatal error: exception Invalid_argument("index out of bounds")

With standard ocaml:
228 states, 1162 transitions, table size 6016 bytes
Notiz
(0000267)
xclerc   
2013-01-30 22:05   
Thanks for reporting, there is indeed an embarrassing
problem with the handling of large int values. Here is
a minimal repro case:


let x = 4611686018427387903

let f x =
  if x = 4611686018427387903 then
    print_endline "here"
  else
    print_endline "there"

let () = f x




Erweiterte Problemanzeige
103 [Cadmium] general kleinerer Fehler immer 2012-07-28 06:55 2013-03-07 23:11
dobesv  
xclerc  
normal  
erledigt 1.4  
erledigt  
keine    
keine  
Unix.descr_of_in_channel stdin fails in OcamlJava, works in OCaml

It appears that the "stdin" channel isn't assigned a unix file descriptor in Cafesterol.

let () =
    let fd = Unix.descr_of_in_channel stdin
    and buf = String.create 1 in
    let chars_read = Unix.read fd buf 1 1
    in print_endline (if chars_read == 1 then buf else "")
;;

This results in :

Fatal error: exception Sys_error("invalid file descriptor")

I ran into this because a library I use was getting filehandles for stdin using the channel instead of looking at stdin directly.
Notiz
(0000252)
dobesv   
2012-07-28 07:21   
I was able to workaround this by using Unix.stdin and Unix.stdout directly.




Erweiterte Problemanzeige
110 [Barista] general schwerer Fehler immer 2013-01-25 08:59 2013-03-07 22:01
xclerc  
xclerc  
normal  
erledigt 2.0-alpha3  
erledigt  
keine    
keine  
Error in annotation encoding of string value
A string value is encoded through a "String" contant pool entry, while a bare "Utf8" one should be used.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
111 [Barista] general schwerer Fehler immer 2013-01-26 17:32 2013-03-07 22:01
xclerc  
xclerc  
normal  
erledigt 2.0-alpha3  
erledigt  
keine    
keine  
Invalid stack frame when locals are changed in a protected block
example:

.method private static void changeLocalInHandler()
        iconst_0
        istore_0
try:
        fconst_0
        fstore_0
        new java.lang.ClassCastException
        dup
        invokespecial java.lang.ClassCastException.<init>():void
        athrow
catch:
end:
        return
        .catch try: catch: catch:
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
116 [Barista] general schwerer Fehler immer 2013-02-14 20:56 2013-03-07 22:01
xclerc  
xclerc  
normal  
erledigt 2.0-alpha3  
erledigt  
keine    
keine  
Invalid stack frame after "invokespecial" instruction
After an "invokespecial" instruction, the type information should
switch from "uninitialized this" to the type of the declaring class.
The current version switches to the type of the class appearing
in the "invokespecial" instruction (hence the parent of the declaring
class).
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
106 [Cafesterol] general kleinerer Fehler immer 2012-10-11 20:05 2013-02-02 09:35
mauny  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
java.lang.ArrayStoreException raised for almabench program from the OCaml test suite
Compile almabench.ml to a jar file with ocamljava, and execute it by java -jar almabench.jar raises java.lang.ArrayStoreException (without printing any number).

When compiled by ocaml, execution prints
0 17.00 -26.06
1 12.34 1.29
2 6.83 22.95
3 0.04 -1.26
4 2.30 12.54
5 2.93 14.35
6 21.27 -16.57
7 20.41 -19.04
and terminates gracefully.
Version is 2.0 early access.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
108 [Bisect] general kleinerer Fehler immer 2012-11-13 10:12 2012-11-13 10:14
edwin  
 
normal  
neu 1.3  
offen  
keine    
keine  
bisect 1.3: doesn't install bisectThread*
When running bisect on an ocaml program that uses threads (for example by linking with lwt) I get an error:
Error: Cannot find file /home/edwin/.opam/4.00.1/lib/bisect/bisectThread.cmx
Command exited with code 2.

It looks like bisectThread* was not installed at all.
The Makefile looks for $(PATH_BUILD)/src/$(PROJECT_NAME)Thread.cm*, but the file is actually in a subdirectory: $(PATH_BUILD)/src/threads/$(PROJECT_NAME)Thread.cm*
Notiz
(0000262)
edwin   
2012-11-13 10:14   
There doesn't seem to be a way to attach bugs on this bug tracker, so here is a patch for Makefile:

--- a/Makefile 2012-11-03 22:21:53.000000000 +0200
+++ b/Makefile 2012-11-13 11:08:26.377616618 +0200
@@ -89,9 +89,9 @@
          $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \
          $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \
            $(PATH_BUILD)/$(PROJECT_NAME)_pp.cmo \
- $(PATH_BUILD)/src/$(PROJECT_NAME)Thread.cm* \
- $(PATH_BUILD)/src/$(PROJECT_NAME)Thread.o \
- $(PATH_BUILD)/src/$(PROJECT_NAME)Thread.jo \
+ $(PATH_BUILD)/src/threads/$(PROJECT_NAME)Thread.cm* \
+ $(PATH_BUILD)/src/threads/$(PROJECT_NAME)Thread.o \
+ $(PATH_BUILD)/src/threads/$(PROJECT_NAME)Thread.jo \
            $(PATH_BUILD)/$(PROJECT_NAME).a \
            $(PATH_BUILD)/$(PROJECT_NAME).cma \
            $(PATH_BUILD)/$(PROJECT_NAME).cmi \
@@ -106,7 +106,7 @@
            cp $(PATH_BUILD)/$(PROJECT_NAME)_pp.cmo $(PATH_INSTALL); \
          fi; \
          for ext in cmi cmo cmx o cmj jo; do \
- test -f $(PATH_BUILD)/src/$(PROJECT_NAME)Thread.$$ext && cp $(PATH_BUILD)/src/$(PROJECT_NAME)Thread.$$ext $(PATH_INSTALL) || true; \
+ test -f $(PATH_BUILD)/src/threads/$(PROJECT_NAME)Thread.$$ext && cp $(PATH_BUILD)/src/threads/$(PROJECT_NAME)Thread.$$ext $(PATH_INSTALL) || true; \
          done; \
          for ext in a cmi cmo cmx cma cmxa cmja ja; do \
            test -f $(PATH_BUILD)/$(PROJECT_NAME).$$ext && cp $(PATH_BUILD)/$(PROJECT_NAME).$$ext $(PATH_INSTALL) || true; \




Erweiterte Problemanzeige
107 [Bolt] general schwerer Fehler immer 2012-10-19 21:04 2012-10-26 21:26
xclerc  
xclerc  
normal  
erledigt 1.3  
erledigt  
keine    
keine  
When using syntax extension with level NONE, generated code should not depend on library
Summary seems pretty explicit
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
105 [Bolt] general Absturz immer 2012-09-09 19:48 2012-09-09 19:50
xclerc  
xclerc  
normal  
erledigt 1.3  
erledigt  
keine    
keine  
Crashes with 'Not_found' when both BOLT_FILE and BOLT_CONFIG are not set
Summary says it all.
Notiz
(0000261)
xclerc   
2012-09-09 19:50   
Fixed in the darcs repository.




Erweiterte Problemanzeige
98 [Kaputt] general Feature-Wunsch immer 2012-03-21 09:33 2012-08-30 15:12
testcocoon  
xclerc  
normal  
erledigt 1.1  
erledigt  
keine    
keine  
Missing return value for launch_tests, run_tests, ...
run_tests, launch_tests and check return unit.
It would me more interesting to return a boolean which indicates if a there is a failure.

This would permits set the exit value of the test application for example.

if launch_test ...
then
  exit 0
else
  exit 1
Notiz
(0000253)
xclerc   
2012-08-29 20:12   
The 'run_tests' and 'launch_tests' functions are intended to output their
results to the standard output. If you want to process the result of tests
execution, you should use 'exec_tests'.
(0000259)
testcocoon   
2012-08-29 21:15   
exec_tests permits check the result of the tests.
But this does not work with tests added used add_xyz test function.
In this case it is necessary to use launch_tests, and so it is not possible to analyze the test execution result into the unit test itself.
(0000260)
xclerc   
2012-08-30 15:12   
You are right. I have added a 'Test.get_tests' function that allows to
retrieve the list of tests added through 'Test.add_xyz' functions.

For now, it is only available in the darcs repository, that can be fetch
by executing "darcs get http://kaputt.x9c.fr". [^]




Erweiterte Problemanzeige
91 [Mascot] general Feature-Wunsch nicht getestet 2012-01-10 11:56 2012-08-29 20:26
ygrek  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
feature wish : ocamlbuild integration
My projects use syntax extensions (several) and the use of that extensions on individual files is specified via _tags. It would be cool if mascot had an ocamlbuild rule that would blend into ocamlbuild invocation taking into account the information on syntax extensions used during a build.
Notiz
(0000258)
xclerc   
2012-08-29 20:26   
Well, ocamlbuild integration is not that easy because Mascot does not
call preprocessors as external command but (when camlp4-based)
loads them in its very process. So, having multiple preprocessors is not
easy.

In an attempt to try to provide the basic building blocks to satisfy your
needs, two new features have been added:
  - a 'binary' output mode that store the result of an analysis;
  - a '-report-only' command-line switch that make Mascot work
    on binary files rather than sources file as input.
The combination of these features allows to combine partial analysis into
a single report.

Back to your feature request: you should design a script taking the
'_build/_log' file and extracting from it the list of compiled source with
their relative preprocessors. Then run Mascot on each file, and latter
combine the analysis done independently on the different files.




Erweiterte Problemanzeige
89 [Mascot] general kleinerer Fehler immer 2012-01-10 11:39 2012-08-29 20:19
ygrek  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
do not use -warn-error A in released version
This may break builds with future ocaml versions
See http://caml.inria.fr/pub/ml-archives/caml-list/2009/11/91883440c8a0481a4233758946e5c3bf.fr.html [^]
Notiz
(0000256)
xclerc   
2012-08-29 20:19   
Fixed, the './configure' script now accepts a '-devel' command-line switch
in order to enable warnings (for development mode).




Erweiterte Problemanzeige
90 [Mascot] general Feature-Wunsch nicht getestet 2012-01-10 11:41 2012-08-29 20:18
ygrek  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
feature wish : output available checks as a ready-to-use config
So that one can simply edit the generated config (set false on unused checks). Optional comments in the generated config would be useful too.
Notiz
(0000255)
xclerc   
2012-08-29 20:18   
Implemented as command-line switch '-default-config'.




Erweiterte Problemanzeige
75 [Mascot] general kleinerer Fehler nicht getestet 2011-08-08 16:17 2012-08-29 20:17
sigonnea  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
'?' should not be followed by whitespace when is refers to an optional label.
This means that the following:

    let f ?(foo = xxx) = ...

should be accepted.
Below is a small patch that corrects this bug.

diff --git a/src/checks/typo_spacesAroundOperators.ml b/src/checks/typo_spacesAroundOperators.ml
index 9909b79..2d9046e 100644
--- a/src/checks/typo_spacesAroundOperators.ml
+++ b/src/checks/typo_spacesAroundOperators.ml
@@ -46,7 +46,7 @@ let run _ _ (_, tokens) _ report =
         (match s.[0] with
         | '-' | '~' ->
             Camlp4Utils.check_white "operator" s err prev
- | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '?' | '@' | '^' | '|' ->
+ | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | (* '?' | *) '@' | '^' | '|' ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
         | ':' when len > 1 && s.[1] = ':' ->
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
76 [Mascot] general kleinerer Fehler nicht getestet 2011-08-08 16:19 2012-08-29 20:17
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
No mandatory spaces around range operator
According to the example in Ocaml documentation (see section 7.4), range pattern does not have to be surrounded by whitespace.
Below is a small patch that corrects this:

diff --git a/src/checks/typo_spacesAroundOperators.ml b/src/checks/typo_spacesAroundOperators.ml
index 2d9046e..5ca5ac0 100644
--- a/src/checks/typo_spacesAroundOperators.ml
+++ b/src/checks/typo_spacesAroundOperators.ml
@@ -46,13 +46,13 @@ let run _ _ (_, tokens) _ report =
         (match s.[0] with
         | '-' | '~' ->
             Camlp4Utils.check_white "operator" s err prev
- | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | (* '?' | *) '@' | '^' | '|' ->
+ | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '@' | '^' | '|' ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
         | ':' when len > 1 && s.[1] = ':' ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
- | '.' when len > 1 ->
+ | '.' when len > 1 && s <> ".." ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
         | _ -> ());
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
77 [Mascot] general kleinerer Fehler nicht getestet 2011-08-08 16:21 2012-08-29 20:17
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
Do not treat (-1) as an error
(-1) raises an error because the '-' sign is not preceeded by whitespace.
Below is a small patch that corrects this:

diff --git a/src/checks/typo_spacesAroundOperators.ml b/src/checks/typo_spacesAroundOperators.ml
index 5ca5ac0..99758b7 100644
--- a/src/checks/typo_spacesAroundOperators.ml
+++ b/src/checks/typo_spacesAroundOperators.ml
@@ -38,13 +38,20 @@ let limits =
 
 let parameters = Parameter.empty_map
 
+let opening = function
+ | Camlp4.Sig.SYMBOL "("
+ | Camlp4.Sig.SYMBOL "["
+ | Camlp4.Sig.SYMBOL "[|" -> true
+ | _ -> false
+
+
 let run _ _ (_, tokens) _ report =
   let rec iter = function
     | (_, _, prev) :: (line, column, (Camlp4.Sig.SYMBOL s)) :: tl ->
         let err = report.Check.error line (Some column) in
         let len = String.length s in
         (match s.[0] with
- | '-' | '~' ->
+ | '~' | '-' when not (opening prev) ->
             Camlp4Utils.check_white "operator" s err prev
         | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '@' | '^' | '|' ->
             Camlp4Utils.check_white "operator" s err prev;
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
79 [Mascot] general kleinerer Fehler nicht getestet 2011-08-08 16:27 2012-08-29 20:16
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
Treat [< ... >] and [| ... |] blocks like { ... } blocks
Ocaml Programming Guidelines don't say anything about it, but :

  - arrays are printed with inner spaces by toplevel ;
  - some examples in ocaml documentation are written in this style
Below is a trivial patch that corrects this issue:

diff --git a/src/checks/typo_spacesAroundBlocks.ml b/src/checks/typo_spacesAroundBlocks.ml
index 1b8495b..4ed5614 100644
--- a/src/checks/typo_spacesAroundBlocks.ml
+++ b/src/checks/typo_spacesAroundBlocks.ml
@@ -84,17 +84,17 @@ let run _ _ (_, tokens) _ report =
     | (_, _, prev) :: (line, column, (Camlp4.Sig.SYMBOL s)) :: tl ->
         let err = report.Check.error line (Some column) in
         (match s with
- | "(" | "[" | "[|" ->
+ | "(" | "[" ->
             if symbol_kind prev <> Opening then
               Camlp4Utils.check_white "sign" s err prev;
             Camlp4Utils.check_first_not_white "sign" s err tl
- | ")" | "]" | "|]" ->
+ | ")" | "]" ->
             let prev_kind = symbol_kind prev in
             if (prev_kind <> Closing) && (prev_kind <> Opening) then
               Camlp4Utils.check_not_white "sign" s err prev;
             if not (first [Closing; Punctuation] tl) then
               Camlp4Utils.check_first_white "sign" s err tl
- | "{" | "}" ->
+ | "{" | "}" | "[|" | "|]" | "[<" | ">]" ->
             Camlp4Utils.check_white "sign" s err prev;
             if not (first [Closing; Punctuation] tl) then
               Camlp4Utils.check_first_white "sign" s err tl
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
80 [Mascot] general kleinerer Fehler nicht getestet 2011-08-08 16:29 2012-08-29 20:16
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
Check for whitespace after '.' used to denote polymorphic type
The following definition should be accepted:

    let id: 'a. 'a -> 'a = fun x -> x

(instead of complaining about an extra space after the dot)
Below is a hacky patch that corrects this:

diff --git a/src/checks/typo_spacesAroundPunctuation.ml b/src/checks/typo_spacesAroundPunctuation.ml
index 1762cda..36a9eb2 100644
--- a/src/checks/typo_spacesAroundPunctuation.ml
+++ b/src/checks/typo_spacesAroundPunctuation.ml
@@ -40,6 +40,17 @@ let parameters = Parameter.empty_map
 
 let run _ _ (_, tokens) _ report =
   let rec iter = function
+ | _ :: (_, _, (Camlp4.Sig.SYMBOL "'")) :: tl ->
+ (match tl with
+ | (_, _, (Camlp4.Sig.LIDENT _)) :: (_, _, (Camlp4.Sig.BLANKS _ as prev)) :: (line, column, (Camlp4.Sig.SYMBOL ".")) :: tl'
+ | (_, _, (Camlp4.Sig.LIDENT _ as prev)) :: (line, column, (Camlp4.Sig.SYMBOL ".")) :: tl' ->
+ let s = "." in
+ let err = report.Check.error line (Some column) in
+ Camlp4Utils.check_not_white "sign" s err prev;
+ Camlp4Utils.check_first_white "sign" s err tl';
+ iter tl'
+ | _ -> iter tl
+ )
     | (_, _, prev) :: (line, column, (Camlp4.Sig.SYMBOL s)) :: tl ->
         let err = report.Check.error line (Some column) in
         (match s with
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
81 [Mascot] general kleinerer Fehler nicht getestet 2011-08-08 16:31 2012-08-29 20:16
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
Allow list or parenthesis directly following a label
The following code should be accepted:

   f ~label:(some thing) ~foo:["bar"; "baz"]

(instead, it complains abot missing whitespace before '(' or '[' sign)
Below is a patch that corrects this:

diff --git a/src/checks/typo_spacesAroundBlocks.ml b/src/checks/typo_spacesAroundBlocks.ml
index 4ed5614..2077d4d 100644
--- a/src/checks/typo_spacesAroundBlocks.ml
+++ b/src/checks/typo_spacesAroundBlocks.ml
@@ -42,6 +42,7 @@ type symbol_kind =
   | Opening
   | Closing
   | Punctuation
+ | Label
   | Other
 
 let symbol_kind = function
@@ -59,6 +60,8 @@ let symbol_kind = function
   | Camlp4.Sig.SYMBOL ";"
   | Camlp4.Sig.SYMBOL ";;"
   | Camlp4.Sig.SYMBOL "." -> Punctuation
+ | Camlp4.Sig.LABEL _
+ | Camlp4.Sig.OPTLABEL _ -> Label
   | _ -> Other
 
 let first kinds = function
@@ -85,7 +88,8 @@ let run _ _ (_, tokens) _ report =
         let err = report.Check.error line (Some column) in
         (match s with
         | "(" | "[" ->
- if symbol_kind prev <> Opening then
+ let prev_kind = symbol_kind prev in
+ if (prev_kind <> Opening) && (prev_kind <> Label) then
               Camlp4Utils.check_white "sign" s err prev;
             Camlp4Utils.check_first_not_white "sign" s err tl
         | ")" | "]" ->
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
84 [Mascot] general kleinerer Fehler immer 2011-11-22 19:02 2012-08-29 20:16
guillaumeclaret  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
Invalid generated HTML, icons not working with Firefox
The report generated with the Html backend is not W3C compliant; this would be solved adding an appropriate header, using "margin: auto;" for the "table.report" style instead of "<p align="center"> …

" and removing the "'".
Moreover, icons for errors/warnings/info are not displaying with Firefox (since it first sees an empty "src" attribute, what is forbidden). A working solution for me is:
.error {
  width: 16px;
  height: 16px;
  background: url(data:image/png;base64 … );
}
instead of:
img.error {
  width: 16px;
  height: 16px;
  vertical-align: bottom;
  content: url(data:image/png;base64 … );
}

and:
<div class="error"></div>
instead of:
<img class="error" alt="error"/>
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
87 [Mascot] general kleinerer Fehler immer 2012-01-10 11:26 2012-08-29 20:16
ygrek  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
install shouldn't build anything
install target depends on all. This seems to be contrary to GNU standards which say that install target shouldn't build anything.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
94 [Mascot] general kleinerer Fehler immer 2012-01-10 14:34 2012-08-29 20:16
ygrek  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
named and optional parameters
This is an example of style mascot wants for signature item :

val listen : ?addr:Unix.inet_addr -> port: int -> ?cidr:string array -> Async.Ev.event_base -> handler -> unit

Notice the space after port: and no space after addr:
I would prefer no required space after named and optional parameters (separate check?).
Notiz
(0000248)
ygrek   
2012-01-10 14:34   
this is feature wish




Erweiterte Problemanzeige
96 [Mascot] general Feature-Wunsch immer 2012-01-17 16:35 2012-08-29 20:15
ygrek  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
typography.trailing_white_space should provide a parameter
typography.trailing_white_space should provide a parameter to specify the minimum allowed number of whitespaces
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
93 [Mascot] general kleinerer Fehler immer 2012-01-10 14:32 2012-08-29 20:15
ygrek  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
detect duplicate entries in mli
title says it all
Notiz
(0000254)
xclerc   
2012-08-29 20:15   
Implemented as "interface.duplicate" check.




Erweiterte Problemanzeige
85 [Kaputt] general kleinerer Fehler nicht getestet 2011-11-23 11:35 2012-08-29 20:11
superbobry  
xclerc  
normal  
erledigt 1.1  
erledigt  
keine    
keine  
Kaputt doesn't install .cmi file
Current version of Kaputt doesn't install kaputt.cmi file, making it impossible to use. A patch is available [*].

Also, two unrelated things:

* Have you considered switching to OASIS? it makes this kind of bugs impossible to make
* ... and maybe using Forge or Github for issues? it would be much easier to report bugs this way, since a lot of people already have an account on one (or both) of these sites

Thanks!

[*] http://pastebin.com/jhhKN8cN [^]
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
95 [Bisect] general kleinerer Fehler immer 2012-01-15 20:34 2012-08-14 19:32
sliquister  
xclerc  
normal  
erledigt 1.1  
erledigt  
keine    
keine  
pp_bisect prevents polymorphic recursion
pp_bisect removes the quantifiers in type annotations like 'a. 'a -> unit, so
the result of the processing does not type anymore if it uses polymorphic
recursion.
Simple example of a program that is broken by pp_bisect:
let rec f : 'a. 'a -> unit =
  fun _ ->
    f 0;
    f ""
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
104 [Bisect] general schwerer Fehler immer 2012-08-01 04:08 2012-08-14 19:32
berenger  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
configure script is not executable after darcs checkout
The perms of the script should be changed
so that right after checkout it is executable.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
99 [Barista] general kleinerer Fehler immer 2012-05-02 18:48 2012-05-13 12:19
rgrig  
xclerc  
normal  
erledigt 2.0-alpha2  
erledigt  
keine    
keine  
packing of int32 into in64 is wrong
The following code appears in several places:
  Int64.logor (Int64.shift_left (Int64.of_int32 hi) 32) (Int64.of_int32 lo)
It's supposed to pack two int32 values into one int64 value. It is incorrect: Take lo=-1.

(This one was particularly hard to track down.)
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
86 [Mascot] general kleinerer Fehler immer 2012-01-10 11:11 2012-01-10 11:11
ygrek  
 
normal  
neu 1.0-beta  
offen  
keine    
keine  
-ocaml-prefix doesn't really work
The given prefix is not prepended to camlp4of invocation and the default one in PATH is used. In my case it was 3.11.2 which doesn't know anything about 3.12-isms in code. So I had both to specify configure argument and alter PATH. I for one would prefer doing only the latter - it is the common and reliable approach.
$ sh configure -ocaml-prefix /opt/ocaml-3.12.1-cfi/
$ make all
+ /opt/ocaml-3.12.1-cfi/bin/ocamldep.opt -pp camlp4of -modules src/checks/code_idempotentOperations.ml > src/checks/code_idempotentOperations.ml.depends
File "src/checks/code_idempotentOperations.ml", line 46, characters 2-8:
Parse error: "virtual" or [opt_private] expected after "method" (in [class_str_item])
Preprocessing error on file src/checks/code_idempotentOperations.ml
Command exited with code 2.
make: *** [all] Error 10
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
83 [Barista] general kleinerer Fehler immer 2011-10-19 14:42 2011-12-21 18:12
rgrig  
xclerc  
normal  
erledigt 2.0-alpha  
erledigt  
keine    
keine  
encode x fails, where x = decode jre6
A colleague tried [1] to use Barista to read the standard library of Java 6 and then write it back. The writing throws exceptions. There are two causes:

1. The library uses jsr, jsr_w, ret, which *are* allowed according to JSR 924. Barista decodes them, but refuses to encode them.

2. The order of the constant pool is shuffled, but the choice of LDC over LDC_W is preserved.

A few comments.

1. I assume the current behavior is a design choice: Be forgiving when you read the input; be strict when you write the output. This, however, makes it hard to use Barista for instrumenting bytecode. Most transformations of the bytecode are local and you don't want Barista's encode function to fail because of something you did not do. A solution might be to have a pair of functions, encode and encode_strict. Another way to put it: Without looking at Barista's internals one probably expects (encode x) to succeed when x is the result of decode.

2. There are two solutions, either keep the constant pool in the high-level representation, or recompute LDC/LDC_W while encoding. I prefer the second variant. Could you also drop LDC_W completely from the Instruction (and keep it only in Bytecode)?


[1] https://github.com/rgrig/papers/blob/master/safety/code/id_instr.ml [^]
Notiz
(0000245)
rgrig   
2011-10-20 20:22   
NOTE: I guess changing LDC<->LDC_W might mess LineNumberTable-s.
(0000246)
xclerc   
2011-10-24 20:58   
The LDC / LDC_W issue is clearly a bug, but I have to give it some thought
before trying to come up with a fix.

The JSR / JSR_W / RET issue might not be a bug. It is pretty clear that they
are part of Java 1.5, but it think they were "removed" in Java 1.6 (most
notably because of bad interactions with stack maps). The fact that they are
present in some JDK 1.6 file is not a definitive answer for me, since I notice
that some JDK classes contain methods with "inaccurate" (albeit valid) values
for max_locals, or max_stack.

Would you have a class file exhibiting the LDC / LDC_W problem?
It would help me to get started.


Thanks for reporting,

Xavier
(0000247)
xclerc   
2011-12-21 18:12   
LDC instructions are now treated as constraints over the
placement of elements inside the constant pool.

Provided that one does not put too many constraints
(i. e. more than the number of indices actually allowed
by LDC), the emitted class files should now be correct.




Erweiterte Problemanzeige
73 [Barista] general kleinerer Fehler immer 2011-08-03 17:35 2011-12-21 18:10
rgrig  
xclerc  
normal  
erledigt 2.0-alpha  
erledigt  
keine    
keine  
does not compile when ocaml (and related dependencies) are in non-standard directory
I needed to apply the attached patch to compile.
1 patch for repository http://barista.x9c.fr: [^]

Wed Aug 3 16:26:32 BST 2011 radugrigore@gmail.com
  * mob

New patches:

[mob
radugrigore@gmail.com**20110803152632
 Ignore-this: a79a19e97db9aae982d8f4a8a155eb13
] {
hunk ./myocamlbuild.ml 73
         flag ["ocaml"; "compile"; "warnings"] (S[A"-w"; A"Ae"; A"-warn-error"; A"A"]);
         flag ["ocaml"; "doc"] (A"-sort");
         flag ["ocaml"; "compile"; "use_zip"] (S[A"-I"; P "+zip"]);
+ flag ["ocaml"; "compile"; "use_camomile"] (S[A"-I"; P "+camomile"]);
         flag ["ocaml"; "link"; "byte"; "use_zip"] (S[A"-I"; P "+zip"; A"zip.cma"]);
         flag ["ocaml"; "link"; "native"; "use_zip"] (S[A"-I"; P "+zip"; A"zip.cmxa"]);
hunk ./myocamlbuild.ml 76
- flag ["ocaml"; "link"; "byte"; "use_camomile"] (S[A"camomile.cma"]);
- flag ["ocaml"; "link"; "native"; "use_camomile"] (S[A"camomile.cmxa"]);
+ flag ["ocaml"; "link"; "byte"; "use_camomile"] (S[A"-I"; P"+camomile"; A"camomile.cma"]);
+ flag ["ocaml"; "link"; "native"; "use_camomile"] (S[A"-I"; P"+camomile"; A"camomile.cmxa"]);
 
         dep [version_tag] [version_ml];
         rule ("generation of " ^ version_ml)
}

Context:

[TAG 2.0-alpha
barista@x9c.fr**20110715041651
 Ignore-this: b71115a27a2fe4f2f8b09019d36a0ac6
]
[MINOR: update for 2.0-alpha
barista@x9c.fr**20110715041320
 Ignore-this: ee4b2233a1b232172a30169b6f250fb5
]
[MINOR: LaTeX description for commands.
barista@x9c.fr**20110714130829
 Ignore-this: e685a14677dce39ef4ce06c6d6d5f939
]
[MINOR: added some examples to the distribution.
barista@x9c.fr**20110714130702
 Ignore-this: 33e40140da708d8ab1cef6572a047c4e
]
[MINOR: errors in stack computation where mistakenly reported as syntax error.
barista@x9c.fr**20110601050824
 Ignore-this: 73ecbc6edcc215b9ec00a2a66a8dddd8
]
[MAJOR: full support for final specification of JSR-292 (a.k.a. "invokedynamic").
barista@x9c.fr**20110601044259
 Ignore-this: 3fa2bf045aa16c5eccd855d2abb6630a
]
[MINOR: fixed error in classfile version handling.
barista@x9c.fr**20110601043811
 Ignore-this: 3c0075cc185b34a4c8814eea31cc5ca
]
[MINOR: 'append' and 'prepend' were ignoring the 'separator' parameter.
barista@x9c.fr**20110601043636
 Ignore-this: fc8484131f21b39f9ce16d8a5f14547f
]
[MINOR: install 'jar' version through findlib.
barista@x9c.fr**20110601043430
 Ignore-this: b5f36137bcaa1203672e81e095d0ced8
]
[MINOR: correct handling of compilation warnings.
barista@x9c.fr**20110601043254
 Ignore-this: 6e1155898b0a2004bb36f33769828fd
]
[*BIGBANG* zillions of API changes.
barista@x9c.fr**20110409143037
 Ignore-this: f5c2eb96afd09bee2925e9c261d1087f
 Should have been in multiple patches...
]
[MINOR: refactoring for class path, and class loader handling.
barista@x9c.fr**20110307170355
 Ignore-this: b2a0cd587fb85d460827e3dd5ee183cb
]
[MAJOR: the executable now recognize 'commands' rather than switches to trigger action.
barista@x9c.fr**20110307160059
 Ignore-this: 2904e5816d779345eb18bee9ee19fc58
]
[MINOR: 'eq' functions renamed to 'equal'.
barista@x9c.fr**20110307053345
 Ignore-this: 5bcc80339efe7cd2989fa9e5083252a4
]
[MINOR: 'JavaVersion' renamed back to 'Version' (and thus rename of 'Version' to 'CurrentVersion').
barista@x9c.fr**20110307051336
 Ignore-this: 5e96e06e78a3d2f4fa09dfd4e3c4226d
]
[MAJOR: removed Java API.
barista@x9c.fr**20110307050159
 Ignore-this: 752fcfbfe82856517eae4a57089eeb9f
]
[MAJOR: all the integers types defined in the 'Utils' module are now declared
barista@x9c.fr**20110306172125
 Ignore-this: 8179cbafeba9d59ad714ba0871438906
 private, and functions are provided to construct instances. This allow check
 bounds at runtime.
]
[MAJOR: miscellaneous refactoring for streams, and Unicode support.
barista@x9c.fr**20110305130446
 Ignore-this: dccc86ea28fec8b99f664f40cc9c4e4a
]
[MINOR: tests updated for new Unicode API, and new error report format.
barista@x9c.fr**20110303153238
 Ignore-this: 982bb5f26e5193899feaddf4aa82d220
]
[MINOR: all Unicode implementation module moved to a 'utf8' directory.
barista@x9c.fr**20110301185747
 Ignore-this: 88da1d89f11e086320d17bb795131df
]
[MAJOR: support for UTF8 elements now in 'Utils.UTF8Xyz' modules.
barista@x9c.fr**20110301185342
 Ignore-this: fda3e47a7016b1e6442ff126e5ccae28
 The actual implementations are provided by the 'UTF8XyzImpl' modules,
 and is still based on Camomile.
]
[MINOR: interface for 'Version' module.
barista@x9c.fr**20110227153339
 Ignore-this: a80c698835f573dc1c1a4a61c619eae0
]
[MAJOR: support for Unicode characters now in 'Utils.UChar' module.
barista@x9c.fr**20110227153136
 Ignore-this: 242d9821e6ca0a8793c87a13ff73beed
 The actual implementation is provided by the 'UCharImpl' module,
 and is still based on Camomile.
]
[MINOR: contents of 'Barista' module spread to 'Args' and 'FlowPrinter' modules.
barista@x9c.fr**20110227075643
 Ignore-this: b8a17d73f87c8bfff88a28cd3c2f659b
]
[MINOR: refactoring of stream modules.
barista@x9c.fr**20110226100926
 Ignore-this: 15d15683167c94cdc0af624db5d4617e
]
[MAJOR: source files reorganized in subdirectories.
barista@x9c.fr**20110226091609
 Ignore-this: 304f4967f8feae5ed881d998831979b6
]
[MINOR: test updated due to API change.
barista@x9c.fr**20110226090442
 Ignore-this: bac05886e75eaacf1dabdcd5840123a6
]
[MINOR: test reference updated due to optimization of stack frames.
barista@x9c.fr**20110226090323
 Ignore-this: 9b2eb21bb6355de64d04a66caaa1ff78
]
[MINOR: year 2011.
barista@x9c.fr**20110226090313
 Ignore-this: 6465ef4bba7dd6e624c91a830d0b4a41
]
[MINOR: back to '1.6' as the default Java version.
barista@x9c.fr**20110226090110
 Ignore-this: 7aaf727cfbb52853c98ce65b8e2357bd
]
[MAJOR: new build system (ocamlbuild-based).
barista@x9c.fr**20110225171023
 Ignore-this: dad53af0b3961c13fbfea02d7cde620f
]
[MINOR: API change: 'Version' module renamed to 'JavaVersion'.
barista@x9c.fr**20110224181754
 Ignore-this: 87b9dde5587cb3d461fd95fb2ab82110
]
[MINOR: update for OCaml 3.12.0 (overridden method warnings).
barista@x9c.fr**20110224180228
 Ignore-this: 446f08335125613568f022c044423186
]
[MINOR: update to Camomile 0.8.1.
barista@x9c.fr**20110224175825
 Ignore-this: b4151ef95004a020fc86d310654584bf
]
[MINOR: the 'remove_load_store' rewriting rule has been split.
barista@x9c.fr**20100526190144
 Ignore-this: 310c15344bfd5850af26c83209b2d19f
]
[MINOR: index added to 'StackState.Invalid_local_contents' error.
barista@x9c.fr**20100526190109
 Ignore-this: ed39c31d375d7fd75ff77790e2a27b66
]
[MINOR: fixed the generation of stack maps in presence of long /double element.
barista@x9c.fr**20100522061242
 Ignore-this: 8248b819a34be12a74659af5f709913e
]
[MINOR: new unifying function working from a bare list added to StackState.
barista@x9c.fr**20100521164548
 Ignore-this: 73af2e72d306c34a0465b599abf9ac25
]
[MINOR: Java 1.7 is now the default target.
barista@x9c.fr**20100521161548
 Ignore-this: fe7e1d2c63adc4433a862d4306ac81c0
]
[MAJOR: support for jsr292-enhanced LDC instructions.
barista@x9c.fr**20100519185319
 Ignore-this: 313b7e6fd2452c4cf82d37e7928c4afb
]
[MINOR: StackState now uses equality functions over names.
barista@x9c.fr**20100519172700
 Ignore-this: c89021f9d94a3bc517452dccd8b4caf4
]
[MINOR: when storing a long/double, the following index should be cleared.
barista@x9c.fr**20100519163218
 Ignore-this: 5721268789acce503584e2f02b72dcd5
]
[MINOR: better exception message for 'StackState.Exception'.
barista@x9c.fr**20100519163111
 Ignore-this: f7169fd1e11e296fb6ee84e979dea648
]
[MINOR: equality functions over names.
barista@x9c.fr**20100519162949
 Ignore-this: 6e7277b4598cfa39825fec6ac1cff620
]
[MINOR: equality functions over descriptors.
barista@x9c.fr**20100519160937
 Ignore-this: 4ff3e29f26b79b1624792493e5dbeb8f
]
[MINOR: indentation fixed in 'main.ml'.
barista@x9c.fr**20100519160454
 Ignore-this: d09071541c056eed216d85edbe21da5
]
[MINOR: class initializers should always be tagged as 'static'.
barista@x9c.fr**20100519160311
 Ignore-this: 4b68ad0eb740006328b0885f2d09a037
]
[MINOR: function to insert rewriting rules into a list.
barista@x9c.fr**20100303183949]
[MINOR: speedups of graph operations.
barista@x9c.fr**20100303183906]
[MINOR: update for new filename scheme.
barista@x9c.fr**20100303183729]
[MINOR: new 'API' functions for the handling of exceptions.
barista@x9c.fr**20100228092430]
[MAJOR: update of Java API (for modules, type annotations).
barista@x9c.fr**20100226223528]
[MINOR: '-optimize' command-line switch to trigger peephole optimizations.
barista@x9c.fr**20100226223456]
[MINOR: 'TOOLS_SUFFIX' variable to easily enable native version of compilers.
barista@x9c.fr**20100226194157]
[MINOR: tests for serialization protocol.
barista@x9c.fr**20100226194150]
[MINOR: tests for peephole/jump optimizations.
barista@x9c.fr**20100226193919]
[MAJOR: peephole optimizations.
barista@x9c.fr**20100226193628]
[MAJOR: support for serialization protocol (version 2).
barista@x9c.fr**20100226193608]
[MINOR: load/add functions for packages/modules are now exported.
barista@x9c.fr**20100223193244]
[MINOR: 'package.html' file converted into 'package-info.java' file.
barista@x9c.fr**20100220220249]
[TYPO: removed superfluous space in exception ocamldoc.
barista@x9c.fr**20100220214952]
[MAJOR: support for type annotations (JSR 308).
barista@x9c.fr**20100220213314]
[MAJOR: space-optimized stack frames.
barista@x9c.fr**20100220155328]
[MINOR: input/output functions for signed 8-bytes integers.
barista@x9c.fr**20100220153307]
[MINOR: new functions for classpath creation.
barista@x9c.fr**20100220153148]
[MAJOR: support for 'package-info' and 'module-info' class files.
barista@x9c.fr**20100220153051]
[MAJOR: support for modules in class files (project Jigsaw / JSR 294).
barista@x9c.fr**20100220122019]
[MAJOR: optimization of jumps (avoiding gotos over gotos).
barista@x9c.fr**20100217185728]
[MAJOR: optimization of exception tables.
barista@x9c.fr**20100217185526]
[MINOR: raises an exception when graph cannot be flattened.
barista@x9c.fr**20100217185445]
[MINOR: equality functions over graph elements.
barista@x9c.fr**20100217182028]
[MINOR: combinators (fixpoint, composition).
barista@x9c.fr**20100217181834]
[MINOR: new i/o implementation for increased readability.
barista@x9c.fr**20100217181613
 The new implementation is also a few percents faster, but this should not
 be noticeable in real-sized applications.
]
[TAG 1.4
barista@x9c.fr**20100206183609]
Patch bundle hash:
22df1a6f0f5402b50158b470553840732ad4dddf
Notiz
(0000239)
rgrig   
2011-08-04 09:47   
I also had to add some flags to ocamldoc.
  flag ["ocaml"; "doc"] (S[A"-sort";A"-I";P"+zip";A"-I";P"+camomile"])


I do not understand what is going on so I'll tell you a bit more about my setup.
I have two computers, on one I am a non-root user and I basically cannot do anything outside my home directory, on the other I can do whatever I want.

On the one I can do what I want I installed ocaml 3.12.1 and camomile from sources in the default locations (configure without prefix) and everything worked just fine.

On the other one I did almost the same with two differences:
 - I also installed camlzip from sources
 - I used --prefix with some directory below my home.
In this second case I had to change myocamlbuild, and I don't really know what I'm doing. (I should probably look at ocamlbuild a bit more.)

In any case, it took me a lot of time to work my way thru various errors (for example, OCaml bug 5278 is just one issue I bumped into that I remember) and it would be nice if things would be a little easier.

Again, everything works perfectly on the machine on which I am root.
(0000242)
xclerc   
2011-08-07 08:41   
Thanks for reporting: the dependencies were indeed not treated uniformly.
I have pushed a fix to this problem. Could you tell if it fixes the problem
on your machine too? For the record, I also use a custom path for the OCaml
distribution (as well as for zip and camomile), so we have somewhat similar
configurations.


Note: I purposely did not add the flags for ocamldoc generation, because I
regard them as "internal" dependencies that the developer should not access
directly by rather through a Barista layer. However, this discussion is quite
arguable.
(0000244)
rgrig   
2011-09-01 17:19   
It works now.




Erweiterte Problemanzeige
74 [Mascot] general kleinerer Fehler nicht getestet 2011-08-03 22:20 2011-08-07 08:20
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine  
typography.spaces_around_operators: check the '::' operator
The Caml programming guidelines [1] state that '::' operator should be surrounded by whitespace, which is not checked in this version of mascot.

[1] http://caml.inria.fr/resources/doc/guides/guidelines.en.html [^]
Here is a trivial patch that performs this check:

[Spaces around '::' operator
Benjamin Sigonneau <benjamin@xxxxxxxxxxxx.info>**20110803201454
 Ignore-this: 989c2be8dc6be67b43faa718ac13b454
 
 Detect the absence of whitespace around the '::' operator, as stated in Caml programming guidelines <http://caml.inria.fr/resources/doc/guides/guidelines.en.html>. [^]
     
] hunk ./src/checks/typo_spacesAroundOperators.ml 48
         (match s.[0] with
         | '-' | '~' ->
             Camlp4Utils.check_white "operator" s err prev
- | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '?' | '@' | '^' | '|' ->
+ | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '?' | '@' | '^' | '|'
+ | ':' when s = "::" ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
         | '.' ->

Context:

[TAG 1.0-beta
mascot@x9c.fr**20110715041203
 Ignore-this: 5d3c45d2c84c26077cf3af5135d116a3
]
Notiz
(0000241)
xclerc   
2011-08-07 08:20   
Thanks for reporting, I just overlooked the "::" operator despite its wide use...
If you found other inconsistencies (or misses) from the official guidelines, do
not hesitate to report them. The goal is of course to be able to enforce them
(or a subset chosen by configuration, and taste) through the tool.




Erweiterte Problemanzeige
72 [Mascot] general schwerer Fehler immer 2011-08-03 16:15 2011-08-07 08:17
sigonnea  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
typography.spaces_around_blocks: Allow punctuation after closing a block
Closing parens have to be followed by whitespace *unless* they are followed by some punctuation, eg. like in

    (f x), (g y)

or in

    [(f x); y]

Notiz
(0000238)
sigonnea   
2011-08-03 16:23   
(bearbeitet am: 2011-08-03 16:51)
The following patch fixes this bug. I can't find how to properly attach it to the bug report, so here it is inlined:

[Allow punctuation after closing a block
Benjamin Sigonneau <benjamin@xxxxxxxxxxxx.info>**20110803140159
 Ignore-this: 8e62908a2f3ed1ae99a0b2bb80e014a
 
 Closing parens have to be followed by whitespace *unless* they are
 followed by some punctuation, eg. like in
 
     (f x), (g y)
 
 or in
 
     [(f x); y]
 
] hunk ./src/checks/typo_spacesAroundBlocks.ml 48
   | Camlp4.Sig.SYMBOL "{"
   | Camlp4.Sig.LIDENT "begin" -> true
   | _ -> false
-
+
 let closing = function
   | Camlp4.Sig.SYMBOL ")"
   | Camlp4.Sig.SYMBOL "]"
hunk ./src/checks/typo_spacesAroundBlocks.ml 63
   | (_, _, hd) :: _ -> closing hd
   | [] -> true
 
+let punctuation = fun t ->
+ match t with
+ | Camlp4.Sig.SYMBOL ","
+ | Camlp4.Sig.SYMBOL "."
+ | Camlp4.Sig.SYMBOL ";"
+ | Camlp4.Sig.SYMBOL ":"
+ | Camlp4.Sig.SYMBOL "::"
+ | Camlp4.Sig.LABEL _
+ | Camlp4.Sig.OPTLABEL _ -> true
+ | _ -> false
+
+let first_punctuation = function
+ | (_, _, hd) :: _ -> punctuation hd
+ | [] -> true
+
 let run _ _ (_, tokens) _ report =
   let rec iter = function
     | (_, _, prev) :: (line, column, (Camlp4.Sig.SYMBOL s)) :: tl ->
hunk ./src/checks/typo_spacesAroundBlocks.ml 84
         let err = report.Check.error line (Some column) in
         (match s with
         | "(" | "[" | "[|" ->
- if not (opening prev) then
+ if not ((opening prev) || (punctuation prev)) then
               Camlp4Utils.check_white "sign" s err prev;
             Camlp4Utils.check_first_not_white "sign" s err tl
         | ")" | "]" | "|]" ->
hunk ./src/checks/typo_spacesAroundBlocks.ml 90
             if not ((closing prev) || (opening prev)) then
               Camlp4Utils.check_not_white "sign" s err prev;
- if not (first_closing tl) then
+ if not ((first_closing tl) || (first_punctuation tl)) then
               Camlp4Utils.check_first_white "sign" s err tl
         | "{" | "}" ->
             Camlp4Utils.check_white "sign" s err prev;

Context:

[TAG 1.0-beta
mascot@x9c.fr**20110715041203
 Ignore-this: 5d3c45d2c84c26077cf3af5135d116a3
]

(0000240)
xclerc   
2011-08-07 08:17   
Thanks for reporting.
I have committed a slightly different patch, to underline the various kinds of symbol:
until now only "opening" and "closing" were explicitly handled; following your report we
now handle "opening", "closing", "punctuation", and "other".


note: the ability to upload/attach a file was disabled after a server attack...




Erweiterte Problemanzeige
71 [Mascot] general Feature-Wunsch N/A 2011-01-25 11:06 2011-07-12 05:00
anonymous  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
detect codeduplication
Hello,

it would be useful if Mascot could be detect ranges where code is duplicated and will be candidate for refactoring. See http://pmd.sourceforge.net/cpd.html [^] for solutions. Thanks :)
Notiz
(0000235)
xclerc   
2011-01-26 20:17   
You are right, this feature is a must-have for style-checking tools.
It will require some modification to the Mascot engine, but will be done
for the next version.

Thanks for the pointer, I will probably directly implement a (variant of ?)
the Karp-Rabin algorithm (*).


(*) see http://en.wikipedia.org/wiki/Rabin [^]–Karp_string_search_algorithm
for an overview




Erweiterte Problemanzeige
67 [Mascot] general Feature-Wunsch immer 2011-01-09 19:52 2011-07-10 06:56
chris  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
if (cond)
It would be nice to detect useless parentheses after “if” which are often added by novices.
Notiz
(0000222)
xclerc   
2011-01-11 19:35   
Good suggestion; I would like to have your feedback on the exact intended perimeter.
It seems quite clear that superfluous top-level parentheses should be detected in:
  - "if" constructs;
  - "while" constructs;
  - "when" constructs.

I am wondering if it should also be detected in:
  - "for" bounds;
  - "let/in" constructs;
  - top-level "let" constructs.

And I may also be missing other constructs.
(0000225)
chris   
2011-01-11 22:07   
Certainly "for" (especially the part after "to"/"downto"). Maybe also "match" — but the "mistake" seems less common in this case. For "let" is is more difficult to say, sometimes top-level parentheses may be desired if the expression is long (and for former version of tuareg since the indentation was influenced by them). If implemented, I would prefer it as a separate rule.
(0000227)
xclerc   
2011-01-19 06:39   
Thanks for your feedback.

I will probably implement the check for "if"/"while"/"when"/"for"/"let-in"
under the name "code.useles_external_parentheses". Then, for toplevel
"let" constructs, we will see if people actually request it...

Will close this bug when implemented in the repository.
(0000230)
chris   
2011-01-19 10:13   
Hum, sorry, when I wrote "let" I especially meant "let-in". Here is an example of useless parentheses that serve indentation purposes:

  let x = (1
           + 2) in

Without these parentheses, the (automatic) indentation would be:

  let y = 1
    + 2 in

which is not suitable for all cases.
(0000231)
chris   
2011-01-19 10:14   
(In the first example above, the "+" is under "1".)
(0000233)
xclerc   
2011-01-20 06:09   
My bad, I misinterpreted your point.

It is indeed quite a good thing not to analyze the "let/in" constructs,
as the asymmetry between the two forms of "let" made me fuzzy.


Thanks for the clarification.




Erweiterte Problemanzeige
70 [Mascot] general Feature-Wunsch N/A 2011-01-24 11:02 2011-07-09 06:14
anonymous  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
mascot could interpret camlp4 using -pp option
Hello,
It would be helpful, if mascot could become an option to parse files through camlp4 before analyzing it. I am using the camlp4-extension of BOLT intensively and mascot reports them as "Syntax error".

The usage of mascot would be easier, if we could pass pp-string through.

Thanks for your great tool.

Bye Andreas
Notiz
(0000234)
xclerc   
2011-01-26 20:13   
Being compatible with Bolt seems pretty natural...
Such a feature will be available with the new version.
(0000237)
xclerc   
2011-07-09 06:14   
The following command-line options are added to handle
both camlp4 and non-camlp4 preprocessors:
  - "-syntax" to set camlp4 base name binary;
  - "-syntax-extension" to set dynamically loaded syntax extensions;
  - "-preprocessor" to set non-camlp4 preprocessor.




Erweiterte Problemanzeige
59 [Bisect] general Unschönheit immer 2010-07-06 15:54 2011-02-12 14:45
art1  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
instrumented code is 20times slower
Hello,

The instrumented testcases runs 20 times slower then without bisect instrumentation. I tried this to test the simple median-function:

(** median of a list
  * @param lst list of ints
  * @return median
  *)
let int_median (lst: int list) =
  match lst with
      [] -> 0
    | _ ->
        begin
          let ar = Array.of_list lst in
          let len = (Array.length ar) in
          let pivot = (len-1)/2 in
            Array.sort Helper.int_cmp ar;
            if len mod 2 == 0 then
              round_int (float_of_int (ar.(pivot) + ar.(pivot+1)) /. 2.0)
            else
              ar.(pivot)
        end
;;

My testcase was:
let testplan_int_median =
  "math (int_median) " >::: [
    "empty " >:: (fun () -> !==! (int_median []) 0);
    "simple " >:: (fun () -> !==! (int_median [1]) 1);
    "2 positives " >:: (fun () -> !==! (int_median (1::3::[])) 2);
    "2 same " >:: (fun () -> !==! (int_median (1::1::[])) 1);
    "2 negatives " >:: (fun () -> !==! (int_median (~-1::-3::[])) ~-2);
    "2 values " >:: (fun () -> !==! (int_median (~-1::1::[])) 0);
    "3 positives " >:: (fun () -> !==! (int_median (1::3::2::[])) 2);
    "3 negatives " >:: (fun () -> !==! (int_median (~-1::~-3::~-2::[])) ~-2);
    "3 values " >:: (fun () -> !==! (int_median (~-1::1::0::[])) 0);
    "5.000.000 values " >:: (fun () -> !==! (int_median five_mill_int) 1);
  ]
;;

I am using OUnit and the testplan runs 15s on my Athlon64 without using bisect. With bisect switched on, the testplan needs approximately 310s.

Because I have larger testcases that issue makes it hard to run all my tests nightly and to calculate the test coverage.

If you have some useful hints, it would be fine.

Thanks in advance, Bye Andreas

Notiz
(0000210)
xclerc   
2010-09-26 14:52   
Well, I am afraid that a huge slowdown is unavoidable when
using code coverage, as one has roughly to "increment counters
everywhere". As far as I can tell, clever profiling approaches
(read "sampling") cannot be applied to code coverage.

Here a some additional notes:
  - it would be possible for Bisect to give additional control over the way
     source code is instrumented (some kind of filter to instrument only some
     given code parts, or some given code constructs - the currently only
     available granularity being the file);
  - it is possible to use the aforementioned file-based granularity to use
     code coverage for unit testing rather than for integration testing (meaning
     that at each run only the tested module is instrumented, the remaining
     modules being "uninstrumented");
  - only the tested code need to be instrumented, the testing code (i. e. test
     framework, and tests encoding) should not be instrumented - this can be
     particularly costly if your testing code contains loops and/or is random-based.

However, I cannot tell if these suggestions can be applied to your settings.


I would be glad to read your feedback about the above.




Erweiterte Problemanzeige
68 [Mascot] general Feature-Wunsch immer 2011-01-09 19:54 2011-01-11 19:30
chris  
xclerc  
normal  
erledigt 1.0-alpha  
erledigt  
keine    
keine  
if ( == )
It would be nice to have the option to detect tests using == and != which are often a mistake made by novices.
Notiz
(0000220)
xclerc   
2011-01-11 19:30   
Good suggestion, implemented under the name "code.physical_comparisons".

The modification is available in the darcs repository.




Erweiterte Problemanzeige
66 [Mascot] general Feature-Wunsch immer 2011-01-09 18:40 2011-01-11 19:29
chris  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
open: allowed modules
It would be nice to be able to specify that certain modules can be opened:

open = { except = { Printf Scanf }}
Notiz
(0000219)
xclerc   
2011-01-11 19:29   
Nice idea, it will be more flexible than using ignore file.
My grain of salt is about syntax and naming: you will have you use
  "open = { allowed_modules = [Printf; Scanf] };"


The modification is available in the darcs repository.




Erweiterte Problemanzeige
65 [Mascot] general kleinerer Fehler immer 2011-01-04 14:23 2011-01-09 17:03
chris  
xclerc  
normal  
erledigt 1.0-alpha  
erledigt  
keine    
keine  
ocamldep: unknown option `-for-pack'
After issuing "make all", the compilation stops with

+ /usr/bin/ocamldep.opt -for-pack MascotLibrary -modules src/driver/args.mli > src/driver/args.mli.depends
/usr/bin/ocamldep.opt: unknown option `-for-pack'.
...

I believe this is a bug in ocamlbuild but then alternative compilation rules should be provided.
Notiz
(0000213)
xclerc   
2011-01-04 18:26   
(bearbeitet am: 2011-01-04 18:32)
Thanks for reporting.

You are right on both points: this is a ocamlbuild problem, and a workaround
should be provided in Mascot. In order to circumvent the problem, could you
provide the result of 'ocamlbuild -vnum'?

[My system is running a vanilla 3.12.0 OCaml]

(0000215)
chris   
2011-01-04 18:47   
It happens with both

$ ocamlbuild -version
ocamlbuild 3.13.0+dev2 (2010-10-22)
$ ocamlbuild -vnum
3.13.0+dev2 (2010-10-22)

and

$ ocamlbuild -version
ocamlbuild 3.11.2

(the latter not supporting vnum).
(0000217)
xclerc   
2011-01-09 17:03   
Here is the by-case analysis:
  - versions before 3.12.0 are not supported because the code
     uses elements that were not available yet (i. e. first class modules);
  - current 3.12.0 official version and hopefully versions 3.12.x are supported;
  - versions 3.13.x are not supported because the camlp4 AST will be enriched.

The new archive uploaded minutes ago has been tested with 3.12.0 and the
"version/3.12" branch of the OCaml repository. To enable easy testing, I have
also uploaded a precompiled bytecode on the website, see:
   http://mascot.x9c.fr/downloads.html [^]




Erweiterte Problemanzeige
64 [Mascot] general kleinerer Fehler immer 2011-01-04 14:20 2011-01-09 16:55
chris  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
xargs doe not work as expected
When I tried to compile with the default makefile, I got

basename: extra operand `/tmp/mascot.x9c.fr/src/driver/args.ml'
Try `basename --help' for more information.

The patch in "additional information" fixes that.

diff -rN -u old-mascot.x9c.fr/Makefile new-mascot.x9c.fr/Makefile
--- old-mascot.x9c.fr/Makefile 2011-01-04 14:10:22.000000000 +0100
+++ new-mascot.x9c.fr/Makefile 2011-01-04 14:10:22.000000000 +0100
@@ -87,7 +87,7 @@
 endif
 
 generate: FORCE
- (find $(PATH_SRC) -name '*.ml*'; echo '') | xargs basename | $(SED) -e 's|\.ml.*$$||' | $(SED) -e 's|^.|\U&|' | sort -u | grep -v Mascot > $(MODULES_ODOCL)
+ (find $(PATH_SRC) -name '*.ml*' -exec basename "{}" \;; echo '') | $(SED) -e 's|\.ml.*$$||' | $(SED) -e 's|^.|\U&|' | sort -u | grep -v Mascot > $(MODULES_ODOCL)
     cp $(MODULES_ODOCL) $(MODULES_MLPACK)
     echo '$(PROJECT_NAME)Library.cmo' > $(PROJECT_NAME)Library.itarget
     (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && echo '$(PROJECT_NAME)Library.cmx' >> $(PROJECT_NAME)Library.itarget) || true
Notiz
(0000212)
xclerc   
2011-01-04 18:23   
Thanks for reporting, it seems that I have been bitten one more time
by a Unix/Linux vs BSD/MacOS X issue. The 'basename' on my system
does not even recognize '--help'...

Can you tell me on which OS you experienced the problem?
(0000214)
chris   
2011-01-04 18:43   
$ uname -a
Linux poincare 2.6.35.7 #1 SMP Sun Oct 3 15:31:24 CEST 2010 x86_64 GNU/Linux
(0000216)
xclerc   
2011-01-09 16:55   
A revamped version of the build system has been set up.
Rather than relying on command-line tools, it uses an ocamlbuild plugin.

The new build system has been validated under MacOS X and Fedora 14.




Erweiterte Problemanzeige
60 [Bolt] general schwerer Fehler immer 2010-09-17 09:20 2010-10-01 16:36
AndreasRomeyke  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
produced XML non conform to expected logj-style, attribute "logger" should use "=" instead of ":"
Hello,

bolt produces following XML-line:
<log4j:event logger:"daemon_sourcecopy.native" level="DEBUG" thread="0" timestamp="0">

But chainsaw (as an example) expects a XML-line of form:
<log4j:event logger="org.apache.log4j.chainsaw.LogUI" timestamp="1284707977341" sequenceNumber="1" level="INFO" thread="AWT-EventQueue-0">

To check, if BOLT works as expected try chainsaw to read XML-logfiles. Chainsaw is found here: http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsawWebStart.jnlp [^]
Notiz
(0000209)
xclerc   
2010-09-26 14:20   
I have been unable to reproduce the problem; could you provide a minimal test case?
I have also browsed the sources, and the "logger:" string do not appear anywhere.
Moreover, the 'Layout.xml' format seems to correctly use "=" and not ":" as can be
seen in "src/layout.ml", line 166.

Thanks in advance for additional feedback.
(0000211)
xclerc   
2010-10-01 16:36   
Sorry for missing it in the first place,
but the bug was indeed fixed during
the update from "1.0-beta" to "1.0".




Erweiterte Problemanzeige
48 [Cadmium] general kleinerer Fehler immer 2009-11-30 11:51 2010-02-06 21:12
xclerc  
xclerc  
normal  
erledigt 1.3  
erledigt  
keine    
keine  
Error in "mod_float" primitive implementation
The Cadmium runtime does not return the same values than the original one
for the "mod_float" primitive. Counterexamples follow:

Through "ocamlc"/"ocamlopt":
4.2 modfloat 1.6 = 1
-4.2 modfloat 1.6 = -1
4.2 modfloat -1.6 = 1
-4.2 modfloat -1.6 = -1

Through "ocamljava":
4.2 modfloat 1.6 = -0.6
-4.2 modfloat 1.6 = 0.6
4.2 modfloat -1.6 = -0.6
-4.2 modfloat -1.6 = 0.6


Source file used to generate counterexamples:
let tests = [
  4.2, 1.6 ;
  (-4.2), 1.6 ;
  4.2, (-1.6) ;
  (-4.2), (-1.6) ;
]

let () =
  List.iter
    (fun (x, y) ->
      Printf.printf "%g modfloat %g = %g\n" x y (mod_float x y))
    tests
Notiz
(0000197)
xclerc   
2009-11-30 12:08   
The fix is trivial: the 'Math.IEEEremainder' method should be replaced by the '%' operator.




Erweiterte Problemanzeige
47 [Barista] general kleinerer Fehler zufällig 2009-11-21 11:56 2010-02-06 21:12
xclerc  
xclerc  
normal  
erledigt 1.3  
erledigt  
keine    
keine  
The assembler generates invalid line number information
The use of "@LineNumber" sometimes results in "invalid pc" when the generated
class is loaded by a Java Virtual Machine.

The randomness of the bug stems from the fact that the list handling the information
about line numbers is not flushed before assembling of each method. This implies that
a given method is assembled not onlu with the line number information for this very method,
but also with the information of all previously assembled methods for the current file.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
46 [Barista] general schwerer Fehler immer 2009-11-21 11:51 2010-02-06 21:12
xclerc  
xclerc  
normal  
erledigt 1.3  
erledigt  
keine    
keine  
Invalid padding for 'tableswitch' and 'lookupswitch' instructions
The padding computed for 'tableswitch' and 'lookupswitch' instructions is incorrect.
It leads to invalid values for instruction size as returned by 'Instruction.size_of', and
'Instruction.compile'.

It also generates invalid destination offsets for such instructions when compiled by
the assembler. In this later case, a temporary workaround is to use 'nop' instructions
to "artificially pad" the instruction.

However, there is no problem when these instructions are used from either
'Instruction.encode' or 'Instruction.decode'.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
28 [Barista] general Feature-Wunsch nicht getestet 2009-02-26 15:32 2010-02-06 21:12
samuelhym  
xclerc  
normal  
erledigt 1.1  
erledigt  
keine    
keine  
ocamlfind compatibility
This is a wishlist item, not a bug report.
Would it be possible to include in barista ocamlfind information? I didn't investigate the actual full features of ocamlfind but it seems to ease installation into proper directories beside easing further use of the library.

Anyway, if this helps, I added the following META file into my /usr/local/lib/ocaml/3.10.2/barista directory:
---- begin META ----
name="barista"
version="1.1"
description="OCaml library to handle Java .class files"
requires="str zip camomile"

archive(byte)="baristaLibrary.cma"
archive(native)="baristaLibrary.cmxa"
---- end META ----

for ocamlfind ocamlc -package barista -c whatever.ml to compile without installing barista in the ocamlc -where directory (to keep that directory properly handled by debian package management).

Cheers
Sam
Notiz
(0000168)
xclerc   
2009-03-08 13:49   
I do agree with you, ocamlfind compatibility is definitely a should-have.
I am however concerned by the fact that this would add a dependency to
the project; unless two installation modes are provided.

Anyway, this feature wish should find its way into the Barista project
(although maybe not in the next release).




Erweiterte Problemanzeige
57 [Kaputt] general schwerer Fehler immer 2010-01-13 23:04 2010-01-16 11:37
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Tests fail on 64-bit platform
When running the tests (through "make tests") after successful compilation,
the process fails on 64-bit platforms with the following error:
  Fatal error: exception Invalid_argument("Random.int")

The problem stems from the fact that "Random.int" (and "Random.State.int",
for that matter) accepts a value that is less than 2**30, while Kaputt issues
calls with the "max_int" value. The "max_int" value is 2**30-1 on 32-bit
platforms, but 2**62-1 on 64-bit platforms. Hence the bug.
Notiz
(0000206)
xclerc   
2010-01-16 11:37   
The problem has been fixed in the darcs repository.




Erweiterte Problemanzeige
56 [Bolt] general kleinerer Fehler immer 2010-01-13 22:51 2010-01-16 11:37
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Tests fail if "ocamljava" is not present
When running the tests (through "make tests") after successful compilation,
the process fails if the "ocamljava" compiler is not present.
Notiz
(0000205)
xclerc   
2010-01-16 11:37   
The problem has been fixed in the darcs repository.




Erweiterte Problemanzeige
55 [Bolt] general schwerer Fehler immer 2010-01-11 21:24 2010-01-12 20:11
elehack  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Syntax extension de-parenthesizes first argument
With the Bolt syntax extension, if the first message argument is a function application, Bolt de-parenthesizes it (so it now becomes multiple arguments). This can be seen by processing a source file containing only the following line:

LOG "Hello %d" (succ 1) LEVEL TRACE;;

It produces the following code:

Bolt.Logger.log "Test-log" Bolt.Level.TRACE ~file: "test-log.ml" ~line: 1

  ~column: 0 ~properties: [] ~error: None (Printf.sprintf "Hello %d" succ 1)

which fails to type-check.

Function applications occurring in arguments at later positions are preserved intact.
Notiz
(0000204)
xclerc   
2010-01-12 20:11   
Thanks for detecting the problem; a tentative fix has been pushed to the darcs repository.




Erweiterte Problemanzeige
54 [Bolt] general kleinerer Fehler nicht getestet 2010-01-09 23:07 2010-01-10 11:02
elehack  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
META file does not contain all dependencies
The Bolt library file imports the Unix, Str, and Dynlink modules, but the ocamlfind META file does not list these packages as dependencies. The result is that compilation lines for programs using Bolt must also include the unix, str, and dynlink packages even if the program does not directly use those facilities.

This can be fixed by a simple change to the "requires" line in the META file.
Notiz
(0000203)
xclerc   
2010-01-10 11:02   
Thanks for reporting; the bug is now fixed in the darcs repository.




Erweiterte Problemanzeige
53 [Bolt] general kleinerer Fehler immer 2010-01-08 01:15 2010-01-09 20:25
elehack  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Printf argument handling only supports 2 arguments
When I create a LOG expression providing more than two printf format string arguments, bolt_pp only includes the first two. The following code, processed through bolt_pp, demonstrates this:

LOG "Hello %d %d %d" 1 2 3 LEVEL TRACE;;

Preprocessed output:

Bolt.Logger.log "Test-log" Bolt.Level.TRACE ~file: "test-log.ml" ~line: 1
  ~column: 0 ~properties: [] ~error: None
  (Printf.sprintf "Hello %d %d %d" 1 2)

The sprintf invocation should include all three arguments.
Notiz
(0000202)
xclerc   
2010-01-09 20:24   
Thanks for spotting this; the bug is fixed in the darcs repository.




Erweiterte Problemanzeige
52 [Bolt] general schwerer Fehler immer 2009-12-29 07:24 2009-12-29 07:37
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Thread-compatibility module do not compile
The compilation of the project fails on the thread-compatibility module,
as the compiler is unable to locate the 'Mutex' module.

This also applies to Bisect.
Notiz
(0000201)
xclerc   
2009-12-29 07:37   
The problem is fixed in the darcs repositories of both projects.




Erweiterte Problemanzeige
51 [Bisect] general kleinerer Fehler immer 2009-12-26 20:35 2009-12-29 07:37
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Unportable use of 'which' in the Makefile
The use of 'which -s' is not portable.

This also applies to Bolt, and Kapput.
Notiz
(0000199)
xclerc   
2009-12-26 20:51   
"which -s xyz" should be replaced with "which xyz > /dev/null"
(0000200)
xclerc   
2009-12-29 07:37   
The problem is fixed in the darcs repositories of the projects.




Erweiterte Problemanzeige
44 [Cadmium] general kleinerer Fehler immer 2009-09-11 18:37 2009-09-19 23:19
xclerc  
xclerc  
normal  
erledigt 1.2  
erledigt  
keine    
keine  
Message associated with ScriptException is highly uninformative
[originally reported by Maciej Kalbarczyk]

When using the Cadmium-based script engine to compile a flawed
script, the message associated with the javax.script.ScriptException
exception is highly uninformative;
e. g. : "fr.x9c.cadmium.kernel.CadmiumException: callback exception".

The message should be akin to the one returned in the same situation
by the original OCaml toplevel/compilers.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
43 [Cadmium] general kleinerer Fehler immer 2009-08-30 19:25 2009-09-19 23:19
xclerc  
xclerc  
normal  
erledigt 1.2  
erledigt  
keine    
keine  
Cadmium allows marshalling of dynlinked closure
At the opposite of the original implementation, Cadmium allows the marshalling
of dynlinked closures when the "Marshal.Closures" flag is passed. This is obviously
incorrect because there is manifestly no guarantee that the various instances of the
program will perform their dynlinking operations in the same order.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
42 [Cafesterol] general kleinerer Fehler immer 2009-08-28 20:49 2009-09-19 23:19
xclerc  
xclerc  
niedrig  
erledigt 1.2  
erledigt  
keine    
keine  
camlp4-standalone.jar does not what to do with ".cmjs" files
camlp4-standalone.jar does not what to do with ".cmjs" files;
it waits for ".cmxs" files while the coherent extension for ocamljava-compiled
plugins is ".cmjs" (as stated in http://cafesterol.x9c.fr/distrib/cafesterol.pdf). [^]
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
39 [Barista] general Feature-Wunsch immer 2009-05-23 20:18 2009-06-29 21:35
sufrin  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Class files apparently not compatible with Java 1.5 -- but no control over target ...
Standard build generates code that is not compatible with the OS/X (Tiger)
or Solaris Java 1.5 builds (class version error). Code is compatible with Java 1.6 builds on Linux and Solaris.

It may be that this is deliberate, but since Apple is always way behind on its VM versions it's a bit inconvenient not to be able to control the class versions from the barista api.

[Thank you for an otherwise-wonderful library!]


Compiled and ran the Hello world program from the documentation (code sample 2) to generate Hello.class. [[ASIDE: I think the INVOKEVIRTUAL instruction in that sample is incorrect and should be:

Instruction.INVOKEVIRTUAL
( `Class_or_interface (utf8_for_class "java.io.PrintStream"),
  (utf8_for_method "println"),
  ([(`Class (utf8_for_class "java.lang.String"))], `Void)
);

END-ASIDE]]

No 1.5 JVM I have available will run the Hello code; all 1.6 JVM I have available will.
# Solaris java 1.5 running
610$ ssh eclectic java -version
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)

611 $ ssh eclectic java Hello
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        ...

# Linux java 1.6
616$ ssh laborious java -version
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-b06, mixed mode)

617$ ssh laborious java Hello
hello.

# OS/X Java 1.5
617 $ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-275)
Java HotSpot(TM) Client VM (build 1.5.0_16-132, mixed mode, sharing)

618 $ java Hello
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        ...

# OS/X java 1.4
619 $ /System/Library/Frameworks/JavaVM.framework/Versions/1.4/Commands/java Hello
Exception in thread "main" java.lang.UnsupportedClassVersionError: Hello (Unsupported major.minor version 50.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
Notiz
(0000179)
sufrin   
2009-05-23 20:47   
I see now that this is indeed a feature and that therefore the additional information I have supplied is redundant/pointless. My aside about the INVOKEVIRTUAL instruction remains valid.

It would still be good to be able to control (to a small extent) the class file format number. The difference between 5.0 (49) and 6.0 (50) seems to be the
StackMapTable attribute in the latter (which is ignored, it seems, by 5.0 JVMs)
(0000180)
xclerc   
2009-05-24 15:08   
You are right about both points.

Regarding versions, the current (1.2) version writes '.class' files that are
compatible with Java 1.6 only. It can load any '.class' file with Java versions
from 1.0 to 1.6 (thanks to backward compatibility of the Java class file format).
I do agree that this would be a good thing to:
  - be able to produce '.class' files of a given version (hence verifying that
     the data contains only elements compatible with this version) ;
  - verify at loading that the version of the '.class' file is actually coherent
    with its contents.
I thus record "version handling" as a feature request to be implemented
in the next (1.3) version of Barista.

Regarding the documentation, you are clearly right. I failed to keep the
pdf synchronized with the code base. This will also be fixed in the next
version.


Thanks for reporting, and for your interest.
(0000185)
xclerc   
2009-06-29 21:35   
Support for class file format versions has been committed to darcs repository.
A 'Version' module has been introduced, defining the various Java versions.
Moreover, the 'ClassDefinition.encode' function now takes an optional parameter
allowing to specify a Java version (defaulting to '1.6'). Before encoding, a check is
made to ensure that the class definition contains no element incompatible with
the passed version.

Of course, the assembler has been updated accodingly: a '-target' command-line
switch allows to specify the Java version.




Erweiterte Problemanzeige
34 [Bisect] general Feature-Wunsch N/A 2009-03-13 13:39 2009-05-04 22:49
Etienne Millon  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Add a "plain text" output option
In order to be integrated with scripts, the output should be easily parsable, and HTML is not.
Plain-text reports may be less verbose : for example, global and per-file statistics can be enough.
A group of lines in the form :

src/test.ml:54/65:21/23:54/55

would do the job. (the numbers being coverage on bindings, sequences, "for", etc)
Notiz
(0000177)
xclerc   
2009-05-04 22:49   
Several ouput modes have been added, in addition to the existing HTML mode.
The newly introduced modes are: XML, CSV, and bare text.




Erweiterte Problemanzeige
35 [Bisect] general Feature-Wunsch N/A 2009-03-13 13:46 2009-05-03 18:10
Etienne Millon  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Add a way to hide covered code or a better way to jump to uncovered code
Reports for big files may be long to read. The relevant information is : where are the red and yellow lines ?
Code folding is nice, but not very appropriate for a HTML report. On the other hand, Netbeans provides an elegant way to jump to lines with errors : next to the scrollbar are a stack of rectangles who act as an outline. By clicking on it, you can jump at the erroneous line.
Notiz
(0000176)
xclerc   
2009-05-03 18:10   
Both requests have been implemented:
- a navigation bar allows to jump to lines either unvisited or patially visited;
- code folding allows to fold/unfold the part of the code that have little interest.
The first feature can be disabled through the '-no-navbar' command-line flag,
and the second feature can be disabled through the '-no-folding' command-line
flag.

Both features rely on JavaScript and have been successfully tested on Safari and Firefox.




Erweiterte Problemanzeige
33 [Bisect] general Feature-Wunsch N/A 2009-03-13 13:34 2009-05-02 17:03
Etienne Millon  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Add global statistics to the index page
Global coverage rate is relevant, it should appear on the index page.
See LCOV : http://ltp.sourceforge.net/coverage/lcov/output/index.html [^]
Notiz
(0000175)
xclerc   
2009-05-02 17:03   
An entry for global coverage, with its associated gauge, has been added to the "per-file" section.




Erweiterte Problemanzeige
32 [Bisect] general Unschönheit nicht getestet 2009-03-13 13:24 2009-05-02 15:22
Etienne Millon  
xclerc  
normal  
erledigt 1.0alpha  
erledigt  
keine    
keine  
<code> markup not rendering properly
The <code> markup used in the HTML report is not rendered as a fixed-width font. (firefox 3, debian testing)
I suggest using CSS with "font-family:monospace".
Notiz
(0000174)
xclerc   
2009-05-02 15:22   
The css has been modified to force the "font-family" to "monospace"
for code lines. This seems to fix the problem for Firefox.




Erweiterte Problemanzeige
29 [Barista] general Absturz immer 2009-03-09 12:01 2009-03-22 16:25
samuelhym  
xclerc  
normal  
erledigt 1.1  
erledigt  
keine    
keine  
barista is unable to load java.lang.Throwable and java.awt.Container
The decoding of the ClassFile into ClassDefinition fails because some bytecodes are not recognized, when using array types in the constant pool where barista expects only class_or_interface.

I've patched barista for this problem (see email for a darcs generated patch).
Applying the small program:
open BaristaLibrary

let _ =
    let cf = ClassFile.read (InputStream.make_of_channel (open_in Sys.argv.(1))) in
    let cd = ClassDefinition.decode cf in
    let cf' = ClassDefinition.encode cd in
    ClassFile.write cf' (OutputStream.make_of_channel (open_out Sys.argv.(2)))

to the whole classpath standard library reveals some other issues when comparing input and output files. I didn't investigate anything else yet.
Notiz
(0000173)
xclerc   
2009-03-22 16:25   
This is indeed a very unfortunate bug; the "LDC", "LDC_W", and
"INVOKEVIRTUAL" instructions can take an array type as their
(first) parameter.

This as been fixed for the various parts of Barista: API (both
OCaml and Java), assembler, and disassembler. As a result, all
the classes of the JDK 1.6 can be loaded by Barista.




Erweiterte Problemanzeige
31 [Bisect] general Unschönheit nicht getestet 2009-03-13 13:22 2009-03-21 16:07
Etienne Millon  
xclerc  
normal  
erledigt 1.0alpha  
erledigt  
keine    
keine  
Default "make" target
The default "make" target shows a list of targets, suggesting the compilation process is not so easy ; actually "make && make install" does the trick.
I suggest renaming "default" to "help" and making "all" the default target.
Notiz
(0000172)
xclerc   
2009-03-21 16:07   
Well, I do really like having a default target that does nothing but
prints a help message. However, it is right that the life of the user
should be made as easy as possible. As a consequence, the manual
as been enhanced in the 'Building' section, and the following line has
been added after the list of targets:
  "installation is usually done by: 'make all' and 'sudo make install'"




Erweiterte Problemanzeige
36 [Bisect] general kleinerer Fehler N/A 2009-03-13 13:52 2009-03-21 15:35
Etienne Millon  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Cannot instrument under -unsafe
ocamlc (version 3.10.2) emits the following warning when compiling with the -unsafe option active
"Warning: option -unsafe used with a preprocessor returning a syntax tree"

Besides this warning, it seems to work properly.

If it is not possible to turn on -unsafe, it should be in the documentation (anyway, the instrumented version should show less performance than the verbatim one, so -unsafe is useless in this case)
Notiz
(0000171)
xclerc   
2009-03-21 15:35   
As camlp4 is constructing a syntax tree, passing the "-unsafe" switch to
ocamlc is "too late": the syntax tree contains the code for "safe" compilation.
Thus, the '-unsafe' switch should be passed to camlp4 instead.

This means that compiling an "unsafe" module is done by:
   ocamlc -c -I +bisect -pp 'camlp4 -unsafe /path/to/instrument.cma' source.ml
instead of:
   ocamlc -unsafe -c -I +bisect -pp 'camlp4 /path/to/instrument.cma' source.ml

[The manual with be modified to explain this point]




Erweiterte Problemanzeige
37 [Bisect] general schwerer Fehler nicht getestet 2009-03-13 14:07 2009-03-21 15:22
Etienne Millon  
xclerc  
normal  
erledigt 1.0alpha  
erledigt  
keine    
keine  
Compatibility with ocamllex & ocamlyacc
Bisect cannot parse files generated with ocamllex and ocamlyacc.

It is not a critical problem since coverage in generated sources would not be relevant (it is full of jump tables : data coverage would be relevant).

However, it means that ocamlc can parse what bisect can not.
Notiz
(0000170)
xclerc   
2009-03-21 15:22   
The problem, raise when using ocamllex and/or ocamlyacc was indeed due to
the incorrect treatment of array literals (e.g. construct of the form "[| e1; ...; en |]").
This resulted in the shadowing of array elements, possibly making the code incorrect
from a typing point of view.




Erweiterte Problemanzeige
30 [Bisect] general kleinerer Fehler nicht getestet 2009-03-13 13:20 2009-03-21 14:18
Etienne Millon  
xclerc  
normal  
erledigt 1.0alpha  
erledigt  
keine    
keine  
Makefile does not detect whether ocamljava is installed
The Makefile tries to find whether an ocamljava executable is present (line 56), but even if it is not, it makes reference to /usr/bin/ocamljava.
Notiz
(0000169)
xclerc   
2009-03-21 14:18   
The detection of ocamljava was indeed inconsistent throughout the Makefile,
resulting in attempts to call this compiler even if not present.




Erweiterte Problemanzeige
27 [Cadmium] general kleinerer Fehler immer 2008-11-29 08:41 2008-11-29 08:43
xclerc  
xclerc  
normal  
erledigt 1.1  
erledigt  
keine    
keine  
Duplicate entries in 'ocamlrun-scripting-standalone.jar'
The jar file for the standalone scripting engine (ocamlrun-scripting-standalone.jar)
contains duplicate entries, leading to problems when merging this jars with others
or when adding new entries.
Moreover, as a consequence, the jar file is much bigger than should be.
Notiz
(0000167)
xclerc   
2008-11-29 08:43   
The entries from 'ocamlrun.jar' are not added only once.




Erweiterte Problemanzeige
26 [Cadmium] general kleinerer Fehler immer 2008-11-02 19:19 2008-11-02 19:19
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Functions registered with "at_exit" called twice
The functions registered with "Pervasives.at_exit" are called twice when
"Pervasives.exit" is called explicitly and the "stop-jvm" is enabled.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
15 [OCamlScripting] general schwerer Fehler immer 2008-07-05 08:48 2008-11-02 19:06
jimwhite  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
The OCaml-Java JSR-223 engine won't work with external ScriptContexts
The OCamlScriptEngine and friends depend on the engine-specific ScriptContext OCamlContext. That is not a proper implementation because the implementation of the ScriptContext is up to the application/environment that is loading the ScriptEngine.

The consequence is that this JSR-223 engine won't work in any but the simplest environments (those that simply use the default ScriptEngine constructor thus allowing OCamlScriptEngine to use it's special OCamlContext).

That breaks my application (IFCX Wings at http://www.ifcx.org) [^] and so I've come with a quicky patch to get OCaml-Java working for it. I didn't worry about performance (there is some obvious extra overhead in binding access in particular), but I'm submitting this patch (diffed to the 1.0 source I downloaded May 26th) so you can see what sort of change is needed.

My current version is in IFCX SVN (along with other JSR-223 engines):
http://ifcx.svn.sourceforge.net/viewvc/ifcx/thirdparty/scripting/engines/ocaml/ [^]

I'm working on installing darcs (a bit involved on PPC Leopard it seems) so I can track these changes better.

There is a Wings example with OCaml working also in SVN:
http://ifcx.svn.sourceforge.net/viewvc/ifcx/Wings/trunk/OpenOffice/Wings.odt?view=log [^]

diff-ocamlscripting-1.0-to-ifcx-r101 (21 KB) 2008-07-05 08:48
Notiz
(0000011)
xclerc   
2008-07-06 12:10   
Well, I am not a JSR-223 expert, and OCamlScripting is probably not the best designed part of OCaml-Java.
However, I am afraid I do not understand the practical limitation you point out.

It appears to me that a script engine may decide to provide its own "context"; what do you mean by
"the implementation of the ScriptContext is up to the application/environment that is loading the ScriptEngine" ?
I was under the impression (maybe wrong) that the script engine should only provide a "context" suiting its needs
as well as the ones from any user (this may be were the current implementation of OCamlScripting exhibits some
limitations).

Could you also elaborate in which way this breaks your application, by precisely stating what you are trying
to achieve using OCamlScripting, and why the current implementation cannot be used to fulfill this task ?

(0000012)
jimwhite   
2008-07-06 20:03   
(bearbeitet am: 2008-07-06 20:04)
The JSR-223 API is an "embedding" scheme in which the scripting engine operates within the context of some other application. The way I understand it ScriptContext is an interface to an object that the hosting application uses to maintain it's state. The ScriptEngines access it generically through that interface.

For some references:

http://java.sun.com/javase/6/docs/api/javax/script/ScriptContext.html [^]

The interface whose implementing classes are used to connect Script Engines with objects, such as scoped Bindings, in hosting applications.

From the JSR-223 Specification (p40):

The ScriptContext is meant to represent a view of the hosting application.

To further reinforce this idea there is also a Web Scripting Framework specified in JSR-223 which has javax.script.http.HttpScriptContext:

HttpScriptContext, a subinterface of ScriptContext, providing additional methods related to Web functionality

For very simple script engine uses there is a default constructor in which the engine creates it's own ScriptContext (for which there is SimpleScriptContext), but for environments with more complex needs the engine must support ScriptEngine.setContext(ScriptContext) and that is where the OCaml-Java JSR-223 implementation fails because it tries to down-cast to OCamlScriptContext.

IFCX Wings is just such a hosting application and supports many JSR-223 scripting languages but it can't function with the OCaml-Java JSR-223 implementation the way it was, and so that is why I fixed it. I'm interested in promoting inter-language tools using JSR-223 (I applaud your support for it as few language implementors do so far) and OCaml in particular because I'd like to be able to run Harmony on the JVM.

http://www.seas.upenn.edu/~harmony/old/ [^]
http://www.seas.upenn.edu/~harmony/ [^]

(0000013)
xclerc   
2008-07-13 09:20   
Thanks to the references provided by Jim White, it is now quite clear that my previous understanding
of the ScriptContext interface was erroneous. This problem will be fixed in the next (1.1) version of
OCaml-Java that should be available at the end of the summer (2008). One may notice that it is highly
probable that this version of OCaml-Java will see the merge of OCamlScripting into the Cadmium base.
The main reason of having two separate subprojects was that OCamlScripting was relying on Java
1.6-specific elements while the base project was only Java 1.5 compliant (with no dependencies).
The next OCaml-Java version will support Java 1.6, and likely drop support for Java 1.5.




Erweiterte Problemanzeige
20 [OCamlScripting] general schwerer Fehler immer 2008-08-11 13:59 2008-11-02 14:47
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Unable to get a script engine
It is impossible to get a working script engine from any of the following methods:
   - ScriptEngineManager.getEngineByExtension(-);
   - ScriptEngineManager.getEngineByMimeType(-);
   - ScriptEngineManager.getEngineByName(-).

Notiz
(0000023)
xclerc   
2008-08-11 14:04   
The problem stems from the fact that the engine does register itself properly with the runtime.
A temporary workaround is to use ScriptEngineManager.getEngineFactories(-) to iterate
over the available factories, and choose the OCamlScripting one.

This problem will be fixed in the next (1.1) version of OCaml-Java that should be available
at the end of the summer (2008). One may notice that it is highly probable that this version
of OCaml-Java will see the merge of OCamlScripting into the Cadmium base.
The main reason for having two separate subprojects was that OCamlScripting was relying on Java
1.6-specific elements while the base project was only Java 1.5 compliant (with no dependencies).
The next OCaml-Java version will support Java 1.6, and likely drop support for Java 1.5.




Erweiterte Problemanzeige
21 [OCamlScripting] general kleinerer Fehler immer 2008-08-11 14:08 2008-11-02 14:02
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Returned extension is incoherent with other engines
The OCamlScripting engine returns extensions ".ml" and ".mli" while other engines
return extensions with no leading dot.
Notiz
(0000024)
xclerc   
2008-08-11 14:09   
This problem will be fixed in the next (1.1) version of OCaml-Java that should
be available at the end of the summer (2008). One may notice that it is highly
probable that this version of OCaml-Java will see the merge of OCamlScripting
into the Cadmium base. The main reason for having two separate subprojects
was that OCamlScripting was relying on Java 1.6-specific elements while the
base project was only Java 1.5 compliant (with no dependencies).
The next OCaml-Java version will support Java 1.6, and likely drop support for Java 1.5.
(0000164)
xclerc   
2008-08-26 00:53   
All the deleted notes were pure spam.
From this point, only registered users will be able to report a bug, or to add a note.




Erweiterte Problemanzeige
25 [Barista] general schwerer Fehler immer 2008-10-23 17:38 2008-10-23 17:39
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Disassembling of LOOKUPSWITCH and TABLESWITCH is broken
The disassembling of LOOKUPSWITCH and TABLESWITCH instruction
is false when there are padding bytes (i.e. its offset modulo 4 is not 1).
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
22 [Cafesterol] general kleinerer Fehler immer 2008-08-29 13:41 2008-10-12 09:20
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
"ocamljava -print-primitives" does not print anything
Although being undocumented and of limited use, the "-print-primitives" command-line
switch of "ocamljava" should produce some output.
Notiz
(0000166)
xclerc   
2008-10-12 09:20   
(bearbeitet am: 2008-10-12 09:23)
The "-print-primitives" switch prints the table of primitives but excludes the builtin ones
(that is the primitives shipped with Cadmium), thus only printing additional primitives.

To get the builtin primitives printed, one should add to the command-line:
  "-nobuiltin -classpath <cp>"
where "cp" should contains access to all Cadmium builtin primitives (an obvious choice
being hence "ocamlrun.jar").





Erweiterte Problemanzeige
24 [Barista] general schwerer Fehler immer 2008-10-05 16:45 2008-10-05 16:49
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
Support for inner-classes is broken
Any "@InnerClasses x y z t" line results into a "internal error (single inner class attribute waited)" error.

Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
23 [OCamlScripting] general schwerer Fehler immer 2008-09-17 21:01 2008-09-17 21:10
xclerc  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
cadmiumLibrary.cma is missing in the standalone jar
[Originally reported by Mathias John]

The standalone version of the jar file is missing the "*.cma" files from "/usr/local/lib/ocaml/cadmium".
This means that script bindings are not available in interpreted scripts (but are in compiled scripts).
Notiz
(0000165)
xclerc   
2008-09-17 21:10   
The problem has been fixed.
A new version of the jar file has been uploaded, and the darcs repository has been updated accordingly.




Erweiterte Problemanzeige
17 [Cafesterol] general Absturz immer 2008-08-09 17:09 2008-08-11 13:30
raboof  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
current darcs does not build with ocaml 3.10.2
I followed the instructions on the wiki. Everything went fine until 'make -f Makefile.cafesterol', which failed.

(this issue may be moved to Barista as needed :) )
arnouten@bird:~/dev/cafesterol/ocaml-3.10.2$ make -f Makefile.cafesterol
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c asmcomp/debuginfo.mli
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c utils/jclflags.mli
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c utils/jconfig.mli
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c utils/jcomp.mli
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c javacomp/jlambda.mli
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c javacomp/printjlambda.mli
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c javacomp/macroinstr.mli
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c javacomp/printminstr.mli
./ocamlc -w Ae -I utils -I parsing -I typing -I bytecomp -I asmcomp -I javacomp -I driver -I toplevel -I +zip -I +barista -c javacomp/bytecodeutils.mli
File "javacomp/bytecodeutils.mli", line 24, characters 40-65:
Unbound type constructor BaristaLibrary.Utils.utf8
make: *** [javacomp/bytecodeutils.cmi] Error 2
arnouten@bird:~/dev/cafesterol/ocaml-3.10.2$
Notiz
(0000017)
raboof   
2008-08-09 20:23   
The problem was that I hadn't (correctly) installed Barista yet. I added a note to http://ocamljava.x9c.fr/wiki/doku.php?id=cafesterol [^] .

(looks like I don't have permission to update this issue, it can be set to 'resolved, invalid' or something similar)
(0000020)
xclerc   
2008-08-10 22:47   
(bearbeitet am: 2008-08-11 13:30)
This kind of error message usually arise if the user has not a working copy
of Barista installed. The user is thus advised to follow the Barista build process,
and to make sure that no error comes up, including during the "installation" phase.

To check that Barista is installed, one should check that:
  - the directory named `ocamlc -where`/barista actually exists;
  - this directory contains the ".a", ".cma", ".cmi", ".cmj", ".cmja", ".cmo", ".cmx", "cmxa", and ".jar"
  files for the "BaristaLibrary" module.





Erweiterte Problemanzeige
19 [Cafesterol] general kleinerer Fehler immer 2008-08-10 13:35 2008-08-11 13:23
raboof  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Running jars compiled without '-standalone'
When I compile my .ml with '-standalone', it works fine.

Without '-standalone', I assume I should put some jar on the classpath. I am confused, however, which one: most ocaml*.jar jars seem to contain the class, but none appear to work.

It seems http://jijixi.azito.com/cgi-bin/diary/index.rb?date=20080527 [^] had the same error, unfortunately I can't read this language :).
Exception in thread "main" java.lang.NoClassDefFoundError: fr/x9c/cadmium/kernel/AbstractNativeRunner
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:637)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Caused by: java.lang.ClassNotFoundException: fr.x9c.cadmium.kernel.AbstractNativeRunner
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
        ... 12 more
Notiz
(0000019)
xclerc   
2008-08-10 22:42   
This is not really a bug, when the "-standalone" switch of the compiler
is not used, one has to give access to "ocamlrun.jar" from the classpath.
The documentation (as shipped with the next version) will be enhanced
to underline this fact.
(0000021)
raboof   
2008-08-11 10:44   
I figured I needed to put one of the ocaml*.jar's on the classpath, however that does not seem to make the NoClassDefFoundError go away:

arnouten@bird:/tmp$ which ocamljava
/usr/local/bin/ocamljava
arnouten@bird:/tmp$ ocamljava -standalone -o hello.jar hello.ml
arnouten@bird:/tmp$ java -jar hello.jar
Hello world!
arnouten@bird:/tmp$ ocamljava -o hello.jar hello.ml
arnouten@bird:/tmp$ java -cp /usr/local/lib/ocaml/ocamlrun.jar -jar hello.jar
Exception in thread "main" java.lang.NoClassDefFoundError: fr/x9c/cadmium/kernel/AbstractNativeRunner
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:637)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Caused by: java.lang.ClassNotFoundException: fr.x9c.cadmium.kernel.AbstractNativeRunner
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
        ... 12 more
arnouten@bird:/tmp$ jar tf /usr/local/lib/ocaml/ocamlrun.jar | grep fr/x9c/cadmium/kernel/AbstractNativeRunner
fr/x9c/cadmium/kernel/AbstractNativeRunner$1.class
fr/x9c/cadmium/kernel/AbstractNativeRunner$Application.class
fr/x9c/cadmium/kernel/AbstractNativeRunner$Closure.class
fr/x9c/cadmium/kernel/AbstractNativeRunner$Values.class
fr/x9c/cadmium/kernel/AbstractNativeRunner.class
arnouten@bird:/tmp$
(0000022)
xclerc   
2008-08-11 13:23   
The problem stems from the command-line switches passed to "java".
Indeed, when the "-jar" switch is used, any "-cp" or "-classpath" is purely
ignored by the JVM without any warning.

The command-line to run the jar file compiled without "-standalone" is thus:
   java -cp /usr/local/lib/ocaml/ocamlrun.jar:/usr/local/lib/ocaml/stdlib.jar:hello.jar pack.cafesterolMain

Two remarks:
  - in my previous note, I forgot to mention that -besides "ocamlrun.jar"- it is also needed to
  put in the classpath the jar files related to the libraries used by the OCaml program
  (in this case, assuming a simple "hello world" program, only stdlib.jar is needed) ;
  - "pack.cafesterolMain" is the name of the Java class acting as the entry point of the compiled
  OCaml program ("cafesterolMain" is hard-wired but "pack" can be changed using the the
  "-java-package" switch of the compiler).




Erweiterte Problemanzeige
18 [Barista] general schwerer Fehler immer 2008-08-09 19:47 2008-08-10 22:39
raboof  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Cannot download Barista from darcs
'darcs get' fails
arnouten@bird:~/dev/cafesterol$ darcs get http://barista.x9c.fr [^]
Copying patch 46 of 46... done.
Applying patch 43 of 46... Unapplicable patch:
Thu May 22 22:46:44 CEST 2008 barista@x9c.fr
  * MINOR: removed a MacOS X specific file from root directory.
darcs: ./.DS_Store: openBinaryFile: does not exist (No such file or directory)

arnouten@bird:~/dev/cafesterol$
Notiz
(0000018)
xclerc   
2008-08-10 22:39   
The darcs repository has been fixed.
The incriminated patch has been transformed to a "no op" patch.




Erweiterte Problemanzeige
16 [OCamlScripting] general Absturz immer 2008-08-08 14:17 2008-08-09 11:49
mattis23  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
cannot start standalone version
Hello,

when I try to get the scripting engine it reports that the file stdlib.cma is missing. Then it returns null.

Mathias
Notiz
(0000014)
xclerc   
2008-08-08 16:09   
All the cma files were indeed absent from the standalone version of OCamlScripting.
A new version of jar file has been upload to the website, and the darcs repository has
been updated accordingly.
(0000015)
mattis23   
2008-08-08 16:47   
The file ocamlscripting-standalone.jar on the website still doesn't contain the cma files.
(0000016)
xclerc   
2008-08-09 11:49   
The problem was actually fixed.
It seems that the original reporter was bitten by some cahing issue,
as its experiments were still made on the old version.
Anyway, the version currently online fixes the problem.




Erweiterte Problemanzeige
14 [Cafesterol] general schwerer Fehler immer 2008-06-26 19:21 2008-06-27 16:51
anonymous  
xclerc  
normal  
erledigt 1.0  
erledigt  
keine    
keine  
float array literals produce zero-length arrays
Array expressions like [| x |] or [| x ; x |], where x is a float variable,
produce a zero-length array.

Array expressions with other element types work as expected.
Array expressions with floating-point literals like [| 1.0 |] work as well.
$ cat arraybug.ml
let singleton_literal x = [| x |]
let singleton_array_make x = Array.make 1 x
let test singleton x = Printf.printf " %d" (Array.length (singleton x))
let () =
  test singleton_literal 1;
  test singleton_array_make 1;
  test singleton_literal 1.0;
  test singleton_array_make 1.0;
  print_newline ()

$ ocamljava -standalone -o arraybug.jar arraybug.ml
$ java -jar arraybug.jar
 1 1 0 1

$ ocamlopt -o arraybug.opt arraybug.ml
$ ./arraybug.opt
 1 1 1 1

$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

$ ocamljava -config
version (ocaml): 3.10.2
version (cafesterol): 1.0
standard_library: /usr/local/lib/ocaml
standard_runtime: /usr/local/bin/ocamlrun
ccomp_type: javac
architecture: Java
model: JVM 1.5+
ext_obj: .jo
ext_lib: .jar
default_executable_name: camlprog.jar
systhread_supported: true

$ ocamlopt -config
version: 3.10.2
standard_library_default: /usr/local/lib/ocaml
standard_library: /usr/local/lib/ocaml
standard_runtime: /usr/local/bin/ocamlrun
ccomp_type: cc
bytecomp_c_compiler: gcc -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC
bytecomp_c_linker: gcc -Wl,-E
bytecomp_c_libraries: -lm -ldl -lcurses -lpthread
native_c_compiler: gcc -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
native_c_linker: gcc
native_c_libraries: -lm -ldl
native_partial_linker: ld -r
ranlib: ranlib
cc_profile: -pg
architecture: i386
model: default
system: linux_elf
ext_obj: .o
ext_asm: .s
ext_lib: .a
ext_dll: .so
os_type: Unix
default_executable_name: a.out
systhread_supported: true
Notiz
(0000010)
xclerc   
2008-06-27 16:51   
The same problem occurs when the provided source is compiled with "ocamlc",
and then run with "ocamlrun.jar".
Actually, the bug lies in the implementation of the "caml_make_array" primitive.
When the primitive was passed a "classical" block containing floats values, it tried
to use it as a "double array" block. It is indeed the only task of the primitive to
take a "classical" block corresponding to an array, and to return a "double array"
block if the elements are floats.

The bug is now fixed in the Darcs repository of the Cadmium project.




Erweiterte Problemanzeige
12 [Cafesterol] general kleinerer Fehler immer 2008-05-10 14:53 2008-05-10 14:57
xclerc  
xclerc  
normal  
erledigt 1.0beta  
erledigt  
keine    
keine  
"class not found" error from ocamljava while the class if actually present
[originally reported by Yong Lu]
the ocamljava compiler raises a "class not found" error while the class is actually
present and correct (as compiled by javac).
Notiz
(0000008)
xclerc   
2008-05-10 14:57   
This problem arises when the class has been compiled with a Java 1.6+ compiler.
As a consequence ocamljava (through Barista) cannot load it (it is only 1.5-compilant).

The message written by ocamljava has been modified to be more informative.
The user should use the '-target 1.5' switch of javac to produce ocamljava-compatible class files.




Erweiterte Problemanzeige
11 [Barista] general schwerer Fehler immer 2008-05-10 14:24 2008-05-10 14:27
xclerc  
xclerc  
normal  
erledigt 1.0beta  
erledigt  
keine    
keine  
Fails to produce class file when directories already exist
When Cadmium-interpreted or Cafesterol-compiled, if (a part of) the path to the file to be produced
already exist then Barista fails.
Notiz
(0000007)
xclerc   
2008-05-10 14:27   
The problem was due to the partial support of Unix module.
To be precise, the "Unix.mkdir" primitive when raising an exception does not populate it with the same
parameters as the standard ocamlc/ocamlopt-compiled programs.

One should note that the same is also true for all Unix primitives.




Erweiterte Problemanzeige
10 [Cadmium] general kleinerer Fehler immer 2008-03-24 22:10 2008-03-24 22:13
xclerc  
xclerc  
normal  
erledigt 1.0beta  
erledigt  
keine    
keine  
Invalid string conversion of some float values.
[reported on the caml list by camaradetux AT gmail DOT com]

Examples of invalid conversions:
# 1000.**10.;;
- : float = 1.00000000000000000e+3
# 8.**35.;;
- : float = 4.05648192073033400e+31
# 8.**34.;;
- : float = 5.07060240091291760e+3
# 8.**33.;;
- : float = 6.33825300114114700e+29

It seems the last '0' is not displayed.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
9 [Cadmium] general schwerer Fehler immer 2008-03-17 21:39 2008-03-17 21:47
xclerc  
xclerc  
normal  
erledigt 1.0beta  
erledigt  
keine    
keine  
Source does not compile under Java 1.6/1.7
[reported by Richard Jones]
It is not possible to compile the Cadmium sources using a Java 1.6/1.7 compiler :

cadmium-1.0-beta/src/fr/x9c/cadmium/support/values/Option.java:128: a generic class may not extend java.lang.Throwable
     public final class NoValue extends RuntimeException {
Notiz
(0000006)
xclerc   
2008-03-17 21:47   
An exception may not be a generic class. In this case, the exception is not generic itself but
is an inner class of a ganeric class and should hence be declared as "static".

In fact, the source was incorrectly accepted my the Java 1.5 compiler.
It should not have compiled on any compiler but the JDK 1.5 compiler seems buggy in this respect.




Erweiterte Problemanzeige
4 [Cadmium] general Absturz immer 2008-03-02 15:44 2008-03-09 00:33
pengzang  
xclerc  
normal  
erledigt 1.0alpha  
erledigt  
keine    
keine  
ArrayIndexOutOfBoundsException when loading str.cma in ocaml.jar from ocamljava distribution announced on caml-list
After entering ocamljava/bin and running "java -jar ocaml.jar" a OCaml top level appears in a java window.

Loading the Str library generates the error.


This is a Godi install of OCaml 3.09.3. I am running a Gentoo Linux on 2.6.19-gentoo kernel. Java version is:

java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)


I have copy and pasted the error in the additional information field. This also happens when I do not use topfind and instead use the #load directive manually to load the "str.cma" library.

Thank you for your work on this. OCamlJava is a very exciting project. Many libraries I need for my work are Java libraries.
        Objective Caml version 3.09.3

# #use "topfind";;
- : unit = ()
[.] [/home/peng/app-data/godi/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi/lib/ocaml/std-lib] [/home/peng/app-data/godi/lib/ocaml/std-lib/camlp4]
Findlib has been successfully loaded. Additional directives:
  #require "package";; to load a package
  #list;; to list the available packages
  #camlp4o;; to load camlp4 (standard syntax)
  #camlp4r;; to load camlp4 (revised syntax)
  #predicates "p,q,...";; to set these predicates
  Topfind.reset();; to force that packages will be reloaded
  #thread;; to enable threads

- : unit = ()
# #require "str";;
/home/peng/app-data/godi/lib/ocaml/std-lib/str.cma: loaded
error: internal errorjava.lang.ArrayIndexOutOfBoundsException: 1
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
7 [Cadmium] general kleinerer Fehler immer 2008-03-06 19:16 2008-03-06 20:14
xclerc  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine  
Unable to load embedded library
Although present in the jar file, a library will fail to be loaded by embedded mode.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
6 [Cadmium] general schwerer Fehler immer 2008-03-06 19:14 2008-03-06 19:37
xclerc  
xclerc  
normal  
erledigt 1.0beta  
erledigt  
keine    
keine  
Writing to existing file in embedded mode
When using embedded mode, opening an existing file (from the actual file system, not from the jar file) and then trying to write to it will fail.
An internal error occurs, caused by a NullPointerException.
Notiz
(0000004)
xclerc   
2008-03-06 19:37   
A "real" file is now correctly handled, and a check has been added to raise a 'Sys_error' if a try is made
to use an "embedded" file in write mode.




Erweiterte Problemanzeige
3 [Cadmium] general kleinerer Fehler immer 2007-09-14 10:20 2007-09-14 16:36
xclerc  
xclerc  
normal  
erledigt 1.0alpha  
erledigt  
keine    
keine  
Pervasives.do_at_exit not call when exit occurs in a callback
When "exit" is called in a callback, if "isExitSoppingJVM" is false, then the callback named
"Pervasives.do_at_exit" is not called.
Zu diesem Problem gibt es keine Notizen.




Erweiterte Problemanzeige
2 [Cafesterol] general kleinerer Fehler immer 2007-09-12 02:07 2007-09-14 16:36
gmiller  
xclerc  
normal  
erledigt 1.0alpha  
erledigt  
keine    
keine  
Jcompflags needs executable permission
The stdlib/Jcompflags file needs to be marked as executable in the release or it causes an error in the build. chmod +x Jcompflags solved this but needs to be fixed in the distro.
Notiz
(0000002)
xclerc   
2007-09-13 21:13   
This is a darcs-related issue, as darcs do not preserve file permissions.
Hence, stdlib/Makefile.cafesterol will use "chmod +x" to ensure that
stdlib/Jcompflags can be executed.