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

camlp4 doesn't handle "-I +directory" notation for include directories #4855

Closed
vicuna opened this issue Sep 2, 2009 · 2 comments
Closed
Milestone

Comments

@vicuna
Copy link

vicuna commented Sep 2, 2009

Original bug ID: 4855
Reporter: Dmitry Grebeniuk
Assigned to: @bobzhang
Status: closed (set by @xavierleroy on 2015-12-11T18:21:11Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.1
Target version: 4.01.0+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: @ygrek

Bug description

I'm using a syntax extension that installs to ocamlc -where/dir.
I've tried to use it with

$ camlp4 ... -I +dir pa_someext.cmo ...

but with no success:

Camlp4: Uncaught exception: DynLoader.Error ("pa_someext.cmo", "file not found in path")

However, ocamlc/ocamlopt does handle this correctly:

$ ocamlc -I +dir pa_someext.cmo -o somebin

shows to me that pa_someext.cmo is found and processed.

Looking at camlp4 sources I've figured out why camlp4 doesn't handle +directory notation: function "include_dir" in "$ocamlsources/camlp4/Camlp4/Struct/DynLoader.ml" doesn't have any special processing of "+directory" syntax.

IMHO every ocaml-related tool (toplevel, compiler, preprocessor) should have the same semantics for -I option.

File attachments

@vicuna
Copy link
Author

vicuna commented Jul 30, 2012

Comment author: furuse

I've attached a patch to fix this.

@vicuna
Copy link
Author

vicuna commented Jul 28, 2013

Comment author: @bobzhang

fixed in revision 13940.
A bit difference is +dir is related to 'camlp4 -where' instead of 'ocamlc -where'

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added the camlp4 label Mar 14, 2019
@vicuna vicuna added this to the 4.01.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
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

1 participant