Skip to content

Conversation

@dra27
Copy link
Contributor

@dra27 dra27 commented Jul 18, 2022

Alternate to #129 with DCO signed commits as the interim 5.0-only commit is removed - and on the v0.15 branch

@dra27 dra27 changed the base branch from master to v0.15 July 18, 2022 08:39
@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Jul 18, 2022
Copy link
Contributor

@tov tov left a comment

Choose a reason for hiding this comment

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

Hey, we have just one question remaining before merging this.

@dra27
Copy link
Contributor Author

dra27 commented Jul 26, 2022

Base builds with 4.10 on my machine?

@tov
Copy link
Contributor

tov commented Jul 26, 2022

Base builds with 4.10 on my machine?

It's failing in CI with an error about not understanding FLAMBDA-style inline annotations.

@tov
Copy link
Contributor

tov commented Jul 26, 2022

@kit-ty-kate
Copy link
Contributor

These are only warnings. Could you use dune build --release instead? (or simply opam)

@tov
Copy link
Contributor

tov commented Jul 26, 2022

These are only warnings. Could you use dune build --release instead? (or simply opam)

They are warnings, but in dev mode the warnings are fatal. Shouldn't people be able to build the library in dev mode?

@dra27
Copy link
Contributor Author

dra27 commented Jul 27, 2022

I get that inlining warning with all released versions of OCaml (4.10-5.0 incl.) so I'd just ignored it (I was assuming that it was an flambda 2 optimisation, so working inside JS). I would say it's reasonable to have the dev profile build without error in the latest version, but it's not strictly necessary for it to build in dev mode for older compilers. In particular, ecosystem users will install base via opam and the package builds in release mode then.

As an aside, I'm suspicious at the 0s taken to build base in https://github.com/tov/base/runs/7525878932?check_suite_focus=true ?

@tov
Copy link
Contributor

tov commented Jul 27, 2022

I think there are two different issues:

  1. Warning 55 on all relevant OCaml versions (4.10 and later) that round_nearest cannot be inlined in src/float.ml:

    File "src/float.ml", line 492, characters 10-52:
    492 |   let t = (round_nearest [@ocaml.inlined always]) t0 in
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error (warning 55 [inlining-impossible]): Cannot inline: Function information unavailable
    
  2. Warning 47 on OCaml < 4.11 that [@inlined hint] has an illegal payload at src/monad.ml:

    File "src/monad.ml", line 200, characters 32-39:
    200 |   let[@inline] bind a ~f = (f [@inlined hint]) a
                                          ^^^^^^^
    Error (warning 47): illegal payload for attribute 'inlined'.
    It must be either 'never', 'always' or empty
    

Both are fixed by building with the release profile.

Not understanding the release process (sorry), I merged a PR #137 into master that fixes 1 but not 2. Clearly 2 is not a reason to drop support for 4.10, nor do we need to fix it. But I do think we should fix 1.

@tov
Copy link
Contributor

tov commented Jul 27, 2022

As an aside, I'm suspicious at the 0s taken to build base in https://github.com/tov/base/runs/7525878932?check_suite_focus=true ?

I see 1s to build and 0s to test. My machine agrees on 0s to test. I suspect the 1s to build is because the workflow is retaining the dune cache between runs.

@tov
Copy link
Contributor

tov commented Jul 27, 2022

I've confirmed (with dune --verbose) that the fast builds are because of caching.

And I've created a draft PR #138 in which CI builds with --profile=release on specified OCaml versions.

@dra27
Copy link
Contributor Author

dra27 commented Jul 27, 2022

Ah, I see what's happening - the failure building with 4.10 is on the master branch, which includes some unreleased v0.16 stuff... the change in src/monad.ml isn't on the v0.15 branch (which this PR is), which is why I was only seeing the warning in src/float.ml.

Do you want to push the commit from #137 to this branch so it gets merged to the v0.15 branch as well?

@tov
Copy link
Contributor

tov commented Jul 27, 2022

Do you want to push the commit from #137 to this branch so it gets merged to the v0.15 branch as well?

Sure, I was trying to be a bit less reckless than I'd been.

@dra27
Copy link
Contributor Author

dra27 commented Jul 28, 2022

Do you want to push the commit from #137 to this branch so it gets merged to the v0.15 branch as well?

Sure, I was trying to be a bit less reckless than I'd been.

All good for me 🙂

kit-ty-kate and others added 6 commits September 29, 2022 12:56
Signed-off-by: Kate <kit.ty.kate@disroot.org>
Signed-off-by: Aaron L. Zeng <me@bcc32.com>
Base hasn't supported OCaml 4.03 and earlier since v0.9

Signed-off-by: David Allsopp <david.allsopp@metastack.com>
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
…omise_no_mutation

Signed-off-by: Jesse Tov <jtov@janestreet.com>

Co-authored-by: hhugo <hugo.heuzard@gmail.com>
@tov tov force-pushed the 5.0-support branch 2 times, most recently from 570de2b to f2a26b3 Compare September 29, 2022 17:18
@tov tov force-pushed the 5.0-support branch 2 times, most recently from 2d53a9c to ef71b70 Compare September 29, 2022 17:25
@tov tov merged commit 46f7fcd into janestreet:v0.15 Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants