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

ocamlbuild infer tag breaks mezzo #6793

Closed
vicuna opened this issue Feb 24, 2015 · 4 comments
Closed

ocamlbuild infer tag breaks mezzo #6793

vicuna opened this issue Feb 24, 2015 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Feb 24, 2015

Original bug ID: 6793
Reporter: @damiendoligez
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:47:30Z)
Resolution: fixed
Priority: high
Severity: major
Version: 4.02.2+dev / +rc1
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.02.2+dev / +rc1
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Child of: #6237

Bug description

Commit 15698 introduced an infer tag for menhir but this breaks mezzo: ocamlbuild tries to launch the following command:

menhir --explain --infer -la 1 --table --ocamlc 'ocamlfind ocamlc --infer -g -annot -bin-annot -strict-sequence -package yojson -package menhirLib -package ulex -package pprint -package fix -package unix -package functory -package str -package ocamlbuild -I parsing -I utils -I lib -I interpreter -I ocamlbuild -I typing -I stdlib -I mezzolib -I compiler -I corelib -I tests/unit' --infer parsing/grammar.mly

and ocamlc gets a --infer on its command line, so it fails.

Steps to reproduce

Just install mezzo with opam.

@vicuna
Copy link
Author

vicuna commented Feb 24, 2015

Comment author: @damiendoligez

I just noticed that the original PR for this change was #6237.

@vicuna
Copy link
Author

vicuna commented Apr 1, 2015

Comment author: @damiendoligez

Note: this problem appears in 4.02, although #6237 claims the patch was only in trunk.

@vicuna
Copy link
Author

vicuna commented Apr 11, 2015

Comment author: @gasche

The "infer" tag is only a symptom: this breakage is caused by the fact that ocamlbuild passes menhir an "-ocamlc ..." command that uses all the tags of the current .mly files, rather than tags appropriate to compile ocaml files.

@vicuna
Copy link
Author

vicuna commented Apr 11, 2015

Comment author: @gasche

This should be fixed (in trunk and 4.02). I decided to try to apply a clean fix to 4.02 instead of just reverting the breakage-provoking commit, but we may revert that decision if it turns out the patch has unintended consequences (in any case it only changes the behaviour of ocamlbuild on menhir-project).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants