Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.3.6] Building from source throws an error in typecore.ml #11787

Open
EliteMasterEric opened this issue Oct 15, 2024 · 10 comments
Open

[4.3.6] Building from source throws an error in typecore.ml #11787

EliteMasterEric opened this issue Oct 15, 2024 · 10 comments

Comments

@EliteMasterEric
Copy link
Contributor

File "src/context/typecore.ml", line 297, characters 24-59:
297 |                           if not (List.exists (ExtLib.String.starts_with p.pfile) ctx.com.std_path) then begin
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This expression has type prefix:string -> bool
       but an expression was expected of type 'a -> bool

This error occurs when building on both Windows and Linux, and occurs for me both locally and when building via Github Actions, on commit ID 760c0dd, which is the tag of the 4.3.6 stable release.

Since the branch itself has not changed, I believe that this error may be a result of some dependency library not being locked properly.

@Simn
Copy link
Member

Simn commented Oct 15, 2024

What OCaml version are you using (ocamlopt -v)?

@EliteMasterEric
Copy link
Contributor Author

The OCaml native-code compiler, version 5.2.0
Standard library directory: /home/eric/.opam/default/lib/ocaml

If the version of OCaml needs to be locked to a specific version, then that should be part of the Github Actions workflow as well. You can see my failed workflow here:

https://github.com/EliteMasterEric/haxe/actions/runs/11301069165

@Simn
Copy link
Member

Simn commented Oct 15, 2024

We definitely want to support OCaml 5 in general, I think it's only going to require a few changes to make Haxe 4 compatible with it. In this case, we have to replace ExtLib.String.starts_with p.pfile with fun s -> ExtLib.String.starts_with p.pfile s.

I still haven't managed to get OCaml 5 running locally on my Windows machine, so it's difficult for me to work on this because I don't see the actual failures.

@EliteMasterEric
Copy link
Contributor Author

I haven't managed to get OCaml 5 running natively on Windows either, I ran my build via WSL just to see if I could get it working after I noticed the CI failure.

Whether or not Haxe wants to support OCaml 5, it currently does not. Github Actions should be version locked wherever relevant, particularly when mismatched versions can cause builds to completely fail with zero code alterations. I'd notably like Github Actions to work without code alterations as any of these would probably get merged only into the Haxe 5 branch (unless a 4.3.7 version is currently in the works).

@Simn
Copy link
Member

Simn commented Oct 15, 2024

The development branch works fine with OCaml 5 as far as I'm aware, so whatever change we make has to be made on the Haxe 4 branch anyway. I'd prefer to make a change that fixes something over a change that merely avoids the issue (and means we need two different OCaml versions for two different Haxe versions).

@kLabz
Copy link
Contributor

kLabz commented Oct 15, 2024

Try pinning extlib to 1.7.9

@Simn
Copy link
Member

Simn commented Oct 15, 2024

But it's set to "extlib" {>= "1.7.8"} so I'd expect it to pick up 1.7.9 on a fresh install anyway... Still won't hurt to update that.

@kLabz
Copy link
Contributor

kLabz commented Oct 15, 2024

I checked 4.3.6 build logs vs what Eric is getting, and he's getting 1.8.0 (which is incompatible with 4.3_bugfix?) while 4.3.6 was built with 1.7.9

@Simn
Copy link
Member

Simn commented Nov 18, 2024

I've pinned it to 1.7.9 on the 4.3_bugfix branch. Let me know if that fixes it.

@bwkam
Copy link
Contributor

bwkam commented Nov 22, 2024

I have this error too, just built today. Hm, I'm using ocaml 4.14, maybe I need to upgrade.

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

No branches or pull requests

4 participants