Skip to content

Link to graffiti.eliom is incorrect + some functions are outdated + eliom programs migration #11

@MdeLv

Description

@MdeLv

1/ graffiti tutorial
In http://ocsigen.org/tuto/6.4/manual/application.html the link to graffiti.eliom is https://github.com/ocsigen/graffiti/tree/master/simple is incorrect (old Eliom and Cairo API, etc.).
The ppx branch must be merged to master to solve that.
Or, at least, link to https://github.com/ocsigen/graffiti/tree/ppx/simple

Of what 6.4 is the version? (tutorial ?)

2/ outdated functions in graffiti.eliom
Concerning the code, some slight API changes (in Cairo, Tyxml) can be easily fixed.

Can you indicate how to fix the following one?

let slider =
Html.D.Form.input
~a:[
Html.D.a_id "slider";
Html.D.a_input_min 1.;
Html.D.a_input_max 80.
]
~input_type:`Range
Html.D.Form.int
$ make test.byte
...
xxx |       Html.D.a_input_min 1.;
                               ^^
Error: This expression has type float but an expression was expected of type
         Html_types.number_or_datetime Eliom_content.Html.D.wrap
make: *** [Makefile:158: _server/graffiti2.type_mli] Error 2

Can you also have a look at the rest of the code or give some indications about how to fix old functions with recent Eliom 6.12.0, Tyxml 4.4.0, Js_of_ocaml 3.6.0 modules?

graffiti/simple/graffiti.eliom has been updated quite recently (June 2019) and the tutorial claims that it has been tested against eliom 6.7.1 package.
First, there is no 6.7.1 but a 6.7.0 eliom package version (Feb 8, 2019). See https://github.com/ocsigen/eliom/releases .
As a side question, can you check against which version the tutorial has been checked?

3/ more importantly
Can you indicate how to upgrade from one version to another version of a function (from Eliom, Tyxml, or JS_of_ocaml modules )?
Where is filed the history of each type and function (AKA as value)?

The aforementioned compilation error indicates that from a simple type float, eliom is now dealing with a more complex type Html_types.number_or_datetime Eliom_content.Html.D.wrap

As it is a global ocsigen issue/requirement, I open a dedicated issue in ocsigen-start.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions