Skip to content

Conversation

@hhugo
Copy link
Member

@hhugo hhugo commented Nov 13, 2013

use oasis for lib, compiler, doc, syntax, ocaml
use ocamlbuild only for toplevel,examples,tests

#40

@hhugo
Copy link
Member Author

hhugo commented Nov 13, 2013

any comment ?

@kit-ty-kate
Copy link
Contributor

Note that the opam file inside the js_of_ocaml repository is taken before the one I use for testing this. So I got a strange bug that I just figured out what it was :(

@vouillon
Copy link
Member

This does not compile with OCaml 4.00.1 because menhir is called with the --infer option by ocamlbuild.

@kit-ty-kate
Copy link
Contributor

Anyway, eliom doesn't compiles with those changes

File "eliom_comet_base.mli", line 27, characters 0-124 (end at line 31, character 15):
deriving: Json is not a known `class'
Preprocessing error on file eliom_comet_base.mli
Error while running external preprocessor

@kit-ty-kate
Copy link
Contributor

@hhugo As far as I can understand by reading your patch in opam, the opam file inside the project repository is only used to build and remove (?). So we can just remove the things that are unused in both project repository and opam repository.

(Dependencies, descr, install file, … for the project and build/remove for the opam repository)

@hhugo
Copy link
Member Author

hhugo commented Nov 14, 2013

ocaml 4.00.1
I've done a feature request to ocamlbuild (http://caml.inria.fr/mantis/view.php?id=6237) to be able to remove --infer
Anyway, we'll have to copy-paste-modify some menhir rules from ocamlbuild (or find another way to write the hack in js_parser.mly)

@hhugo
Copy link
Member Author

hhugo commented Nov 14, 2013

@jpdeplaix I'm expecting the opam directory in js_of_ocaml to keep track of changes (Dependencies, descr, install file ..) so it can be used when pushing the next version to opam-repo.

I don't think this opam file will ever get used by opam unless the project is "opam pin"

@hhugo
Copy link
Member Author

hhugo commented Nov 15, 2013

I rewrote the hack in js_parser, it now works with ocaml 3.12, 4.00.1

@kit-ty-kate
Copy link
Contributor

While trying to compile cumulus with it, I got an error:

+ ocamlfind ocamlc -linkpkg -g -linkpkg -package eliom.client src/client/templates.cmo src/client/cumulus.cmo -o src/client/cumulus.byte
File "_none_", line 1:
Error: Error while linking ~/.opam/4.01.0/lib/js_of_ocaml/deriving_json.cma(Deriving_Json):
Reference to undefined global `Deriving_Json_lexer'

@hhugo
Copy link
Member Author

hhugo commented Nov 15, 2013

I was able to build cumulus without error after I regenerated oasis file (see "fix previous")

@kit-ty-kate
Copy link
Contributor

It still doesn't work with me :/ Did you tried with the new main repo ? (https://github.com/Cumulus/Cumulus)

@hhugo
Copy link
Member Author

hhugo commented Nov 15, 2013

no, with master found in bitbucket, which is Cumulus/Cumulus@d862fca

@kit-ty-kate
Copy link
Contributor

Then can you try with master (github) ? And if it works for you it's probably because I've the latest OASIS version :/ I'll try myself later.

@hhugo
Copy link
Member Author

hhugo commented Nov 15, 2013

can you check the output of ocamlobjinfo ~/.opam/4.01.0/lib/js_of_ocaml/deriving_json.cma

here is mine

File /Users/hugo/.opam/4.01.0/lib/js_of_ocaml/deriving_json.cma
Force custom: no
Extra C object files:
Extra C options:
Extra dynamically-loaded libraries:
Unit name: Deriving_Json_lexer
Interfaces imported:
    ad06f04cfca6d404d1de76c3dc67324a    Int32
    47d21b6859b2413c7b01b5e94eb45554    Deriving_Json_lexer
    9554e5449c177414a27e7d7ff5ed8013    Char
    d012329cc712e91d0f10a5eef2303d18    Printf
    db7f34081ef8fcaf499f19523d0736c6    String
    af3ef6fba94cdb4eba31e98b4e341dab    Buffer
    50598ab7c92b4bdcc624e472342ac8a9    Lexing
    b0adfa4175f86e4394859886c1a374bb    Obj
    36b5bc8227dc9914c6d9fd9bdcfadb45    Pervasives
    3945db6e8df0d5a79bcbc949ee550d52    Int64
Uses unsafe features: YES
Primitives declared in this module:
    caml_lex_engine
Force link: no
Unit name: Deriving_Json
Interfaces imported:
    47d21b6859b2413c7b01b5e94eb45554    Deriving_Json_lexer
    ad06f04cfca6d404d1de76c3dc67324a    Int32
    9554e5449c177414a27e7d7ff5ed8013    Char
    d012329cc712e91d0f10a5eef2303d18    Printf
    8a6bb22925744456eb66180ea42e3344    Array
    db7f34081ef8fcaf499f19523d0736c6    String
    af3ef6fba94cdb4eba31e98b4e341dab    Buffer
    50598ab7c92b4bdcc624e472342ac8a9    Lexing
    b0adfa4175f86e4394859886c1a374bb    Obj
    36b5bc8227dc9914c6d9fd9bdcfadb45    Pervasives
    d757117653d9319fefb7ddc78a998f41    List
    957cc123cb047bc3a67cbd3baed715ee    Deriving_Json
    e0d18776d4bacff3a198b5c23d0e9355    Format
    3945db6e8df0d5a79bcbc949ee550d52    Int64
Uses unsafe features: no
Force link: no

@kit-ty-kate
Copy link
Contributor

I have only the Deriving_Json part in this file. But the most strange thing is that lib/deriving_json/deriving_json.mllib also, contains only Deriving_Json :/

@hhugo
Copy link
Member Author

hhugo commented Nov 15, 2013

have you tried to regenerate it ? make regenerate_oasis_files ?

@kit-ty-kate
Copy link
Contributor

yes, it seems to fix the problem (see commit). Cumulus compiles fine now. Thanks

@kit-ty-kate
Copy link
Contributor

Same for ocsimore. It's ok for me ! I give my vote for integrating this.

@hhugo
Copy link
Member Author

hhugo commented Nov 15, 2013

funny, I had it working fine without these change. Just because osx is the case-insensitive by default (to be precise, HFS+ is configure to be case-insensitive by default)

@vouillon
Copy link
Member

vouillon commented Feb 6, 2014

What is the status of this change? Shall we include it in the forthcoming Js_of_ocaml release?
(Same question regarding the ocamlbuild pull request.)

@hhugo
Copy link
Member Author

hhugo commented Feb 11, 2014

No need to include this in the forthcoming release.

@hhugo hhugo changed the title Oasis Switch to OASIS May 6, 2014
@kit-ty-kate
Copy link
Contributor

I'm glad you use the compiled_setup_ml but the setup.exe shouldn't be in the repo.
Also, I think the .mllib and .mldylib can be removed. And I think you forgot to add the linkopts things in the META file.

@kit-ty-kate
Copy link
Contributor

And the configure has a bug. It's fixed in the dev version and I hope a new release will appears soon. cc @gildor478
Meanwhile, I think you can resetup with the dev version. Only the configure changed.

@kit-ty-kate
Copy link
Contributor

Oh and the opam file isn't right :/

@hhugo
Copy link
Member Author

hhugo commented May 6, 2014

@jpdeplaix, you're welcome to push any commit to this PR

@hhugo
Copy link
Member Author

hhugo commented May 6, 2014

This is not ready to merge.
missing targets: Toplevel, examples, tests

@kit-ty-kate
Copy link
Contributor

Ok, I'll do it later. Thanks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those 2 lines looks very bad. @jpdeplaix , any suggestion to make this clean ?

@gildor478
Copy link

@jpdeplaix still working on Windows support for OASIS, no release of OASIS this week. Maybe in 2 weeks if I succeed managing Windows crazy setup.

hhugo added 2 commits May 6, 2014 18:06
OASIS part1

merge

update OPAM

updates from jpd
@hhugo
Copy link
Member Author

hhugo commented May 6, 2014

@jpdeplaix, I've push & squash some of your remark in the OASIS part0.

@hhugo hhugo closed this Nov 7, 2016
@hhugo hhugo deleted the oasis branch March 29, 2017 01:16
vouillon added a commit that referenced this pull request Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants