简体   繁体   中英

Alternative dependencies error when switch from dune 1.1 to dune 2.0

I switched my dune project version from (lang dune 1.1) to (lang dune 2.0) which produced an error for the handling of alternate dependencies.

I had the foolowing in my dune file which worked with dune 1.1 :

(select vpl_domain.ml from
  (vpl -> domains/numeric/vpl_domain.ok.ml)
  (!vpl -> domains/numeric/vpl_domain.ko.ml))

But produces with dune 2.0 the error

The format for files in this select branch must be vpl_domain.{name}.ml

I've tried to remove the path before the filename like this:

(select vpl_domain.ml from
  (vpl -> vpl_domain.ok.ml)
  (!vpl -> vpl_domain.ko.ml)))

which seems to make dune happy about the format but gives the error

No rule found for vpl_domain.ko.ml

Am I doing something wrong, is this a bug of dune or did they voluntarily make breaking changes?

I finally found out in the documentation that:

Dune officially only supports user rules with targets in the current directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM