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

Avoid 'assert false' when looking up module .cmo #803

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Julow
Copy link

@Julow Julow commented Sep 16, 2024

This error was reachable when also hitting this error:

Error: Error: Inferred type of injected ident not found. You need to
       regenerate services/.services.objs/byte/game.cmo.

This error was reachable when also hitting this error:

    Error: Error: Inferred type of injected ident not found. You need to
           regenerate services/.services.objs/byte/game.cmo.
@Julow
Copy link
Author

Julow commented Sep 16, 2024

Also, I'm hitting this error while trying to move .eliom and dune files into a subdirectory. Any idea how I could troubleshoot this error?

@vouillon
Copy link
Member

We have rules like:

(rule (target wup_page.ml) (deps ../wup_page.eliom)
  (action
    (with-stdout-to %{target}
      (chdir .. (run tools/eliom_ppx_client.exe --as-pp -server-cmo %{cmo:../wup_page} --impl wup_page.eliom)))))

Is it possible that the dependency on %{cmo:../wup_page} (the server-side cmo file) is missing in your case?

@Julow
Copy link
Author

Julow commented Sep 20, 2024

Thanks for the help! The rule that generates the error is this one:

(rule (target game.ml) (deps ../services/game.eliom)
  (action
    (with-stdout-to %{target}
      (chdir .. (run ../tools/eliom_ppx_client.exe --as-pp -server-cmo %{cmo:../services/game} --impl %{deps})))))

That %{cmo:...} is substituted with a correct path. The invocation is like this, perhaps the PPX doesn't like the directory structure ?

$ (cd _build/default/src && ../tools/eliom_ppx_client.exe --as-pp -server-cmo services/.services.objs/byte/game.cmo --impl services/game.eliom) > _build/default/src/client/game.ml

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.

2 participants