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

dispatch.ml isn't a specific enough name #16

Closed
sgrove opened this issue Mar 27, 2016 · 1 comment
Closed

dispatch.ml isn't a specific enough name #16

sgrove opened this issue Mar 27, 2016 · 1 comment

Comments

@sgrove
Copy link

sgrove commented Mar 27, 2016

I have a dispatch.ml file in my project, and while trying out webmachine I lost a bunch of time trying to figure out why I was getting this error:

$ make
ocamlbuild -use-ocamlfind -pkgs aws,conduit.mirage,containers,functoria.runtime,js_of_ocaml,js_of_ocaml.ocamlbuild,js_of_ocaml.ppx,lambdasoup,lwt.syntax,magic-mime,mirage-clock-unix,mirage-console.unix,mirage-fs-unix,mirage-http,mirage-net-macosx,mirage-types.lwt,mirage.runtime,nocrypto.lwt,omd,opium,sequence,sexplib,tcpip.arpv4,tcpip.ethif,tcpip.ipv4,tcpip.stack-direct,tcpip.tcp,tcpip.udp,tls.mirage,tyxml,webmachine -tags "syntax(camlp4o),annot,bin_annot,strict_sequence,principal,thread" -tag-line "<static*.*>: -syntax(camlp4o)" -cflag -g -lflags -g,-linkpkg -I liquid -use-menhir -plugin-tag "package(js_of_ocaml.ocamlbuild)" main.native
Warning: option -plugin-tag(s) has no effect in absence of plugin file "myocamlbuild.ml"
+ ocamlfind ocamlc -c -g -annot -bin-annot -safe-string -short-paths -principal -keep-locs -thread -strict-sequence -w +A-4-6-9-40-42-44-48 -package webmachine -package tyxml -package tls.mirage -package tcpip.udp -package tcpip.tcp -package tcpip.stack-direct -package tcpip.ipv4 -package tcpip.ethif -package tcpip.arpv4 -package sexplib -package sequence -package opium -package omd -package nocrypto.lwt -package mirage.runtime -package mirage-types.lwt -package mirage-net-macosx -package mirage-http -package mirage-fs-unix -package mirage-console.unix -package mirage-clock-unix -package magic-mime -package lwt.syntax -package lambdasoup -package js_of_ocaml.ppx -package js_of_ocaml.ocamlbuild -package js_of_ocaml -package functoria.runtime -package containers -package conduit.mirage -package aws -syntax camlp4o -I liquid -o key_gen.cmo key_gen.ml
findlib: [WARNING] Interface dispatch.cmi occurs in several directories: ., /Users/s/.opam/riseos/lib/dispatch
+ ocamlfind ocamlc -c -g -annot -bin-annot -principal -thread -strict-sequence -package webmachine -package tyxml -package tls.mirage -package tcpip.udp -package tcpip.tcp -package tcpip.stack-direct -package tcpip.ipv4 -package tcpip.ethif -package tcpip.arpv4 -package sexplib -package sequence -package opium -package omd -package nocrypto.lwt -package mirage.runtime -package mirage-types.lwt -package mirage-net-macosx -package mirage-http -package mirage-fs-unix -package mirage-console.unix -package mirage-clock-unix -package magic-mime -package lwt.syntax -package lambdasoup -package js_of_ocaml.ppx -package js_of_ocaml.ocamlbuild -package js_of_ocaml -package functoria.runtime -package containers -package conduit.mirage -package aws -syntax camlp4o -I liquid -o main.cmo main.ml
findlib: [WARNING] Interface dispatch.cmi occurs in several directories: ., /Users/s/.opam/riseos/lib/dispatch
+ ocamlfind ocamlc -c -g -annot -bin-annot -safe-string -short-paths -principal -keep-locs -thread -strict-sequence -w +A-4-6-9-40-42-44-48 -package webmachine -package tyxml -package tls.mirage -package tcpip.udp -package tcpip.tcp -package tcpip.stack-direct -package tcpip.ipv4 -package tcpip.ethif -package tcpip.arpv4 -package sexplib -package sequence -package opium -package omd -package nocrypto.lwt -package mirage.runtime -package mirage-types.lwt -package mirage-net-macosx -package mirage-http -package mirage-fs-unix -package mirage-console.unix -package mirage-clock-unix -package magic-mime -package lwt.syntax -package lambdasoup -package js_of_ocaml.ppx -package js_of_ocaml.ocamlbuild -package js_of_ocaml -package functoria.runtime -package containers -package conduit.mirage -package aws -syntax camlp4o -I liquid -o liquid/liquid.cmo liquid/liquid.ml
findlib: [WARNING] Interface dispatch.cmi occurs in several directories: ., /Users/s/.opam/riseos/lib/dispatch
+ ocamlfind ocamlopt -c -g -annot -bin-annot -safe-string -short-paths -principal -keep-locs -thread -strict-sequence -w +A-4-6-9-40-42-44-48 -package webmachine -package tyxml -package tls.mirage -package tcpip.udp -package tcpip.tcp -package tcpip.stack-direct -package tcpip.ipv4 -package tcpip.ethif -package tcpip.arpv4 -package sexplib -package sequence -package opium -package omd -package nocrypto.lwt -package mirage.runtime -package mirage-types.lwt -package mirage-net-macosx -package mirage-http -package mirage-fs-unix -package mirage-console.unix -package mirage-clock-unix -package magic-mime -package lwt.syntax -package lambdasoup -package js_of_ocaml.ppx -package js_of_ocaml.ocamlbuild -package js_of_ocaml -package functoria.runtime -package containers -package conduit.mirage -package aws -syntax camlp4o -I liquid -o key_gen.cmx key_gen.ml
findlib: [WARNING] Interface dispatch.cmi occurs in several directories: ., /Users/s/.opam/riseos/lib/dispatch
+ ocamlfind ocamlopt -c -g -annot -bin-annot -safe-string -short-paths -principal -keep-locs -thread -strict-sequence -w +A-4-6-9-40-42-44-48 -package webmachine -package tyxml -package tls.mirage -package tcpip.udp -package tcpip.tcp -package tcpip.stack-direct -package tcpip.ipv4 -package tcpip.ethif -package tcpip.arpv4 -package sexplib -package sequence -package opium -package omd -package nocrypto.lwt -package mirage.runtime -package mirage-types.lwt -package mirage-net-macosx -package mirage-http -package mirage-fs-unix -package mirage-console.unix -package mirage-clock-unix -package magic-mime -package lwt.syntax -package lambdasoup -package js_of_ocaml.ppx -package js_of_ocaml.ocamlbuild -package js_of_ocaml -package functoria.runtime -package containers -package conduit.mirage -package aws -syntax camlp4o -I liquid -o liquid/liquid.cmx liquid/liquid.ml
findlib: [WARNING] Interface dispatch.cmi occurs in several directories: ., /Users/s/.opam/riseos/lib/dispatch
+ ocamlfind ocamlopt -c -g -annot -bin-annot -safe-string -short-paths -principal -keep-locs -thread -strict-sequence -w +A-4-6-9-40-42-44-48 -package webmachine -package tyxml -package tls.mirage -package tcpip.udp -package tcpip.tcp -package tcpip.stack-direct -package tcpip.ipv4 -package tcpip.ethif -package tcpip.arpv4 -package sexplib -package sequence -package opium -package omd -package nocrypto.lwt -package mirage.runtime -package mirage-types.lwt -package mirage-net-macosx -package mirage-http -package mirage-fs-unix -package mirage-console.unix -package mirage-clock-unix -package magic-mime -package lwt.syntax -package lambdasoup -package js_of_ocaml.ppx -package js_of_ocaml.ocamlbuild -package js_of_ocaml -package functoria.runtime -package containers -package conduit.mirage -package aws -syntax camlp4o -I liquid -o dispatch.cmx dispatch.ml
findlib: [WARNING] Interface dispatch.cmi occurs in several directories: ., /Users/s/.opam/riseos/lib/dispatch
File "dispatch.ml", line 354, characters 2-55:
Warning 7: the method allowed_methods is overridden.
File "dispatch.ml", line 1:
Error: The files /Users/s/.opam/riseos/lib/webmachine/webmachine.cmi
       and dispatch.cmi make inconsistent assumptions over interface Dispatch
Command exited with code 2.
Compilation unsuccessful after building 12 targets (0 cached) in 00:00:01.
make: *** [main.native] Error 10

Turns out that because there's a dispatch.ml here and one in my project, they can't coexist.

A fuller name for this project would be nice since dispatch is likely to be used in lots of other places too.

@seliopou
Copy link
Member

seliopou commented Apr 9, 2016

@sgrove making what we discussed public and closing the issue.

Seems like this is a transient issue in the process of porting. I imagine that for the most part, utility libraries won't use dispatch. Instead, applications will either use dispatch or webmachine directly as the single way to do path-based dispatching.

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

2 participants