dune icon indicating copy to clipboard operation
dune copied to clipboard

feature(coq): coq macro

Open Alizter opened this issue 3 years ago • 7 comments

This is a continuation of #5967. The difference here is that the extra variables have been removed in a following commit. We now only expose:

Coq configuration variables:

%{coq:coqlib}
%{coq:coq_native_compiler_default}

Version numbers for Coq:

%{coq:version}
%{coq:ocaml-version}
%{coq:version.major}
%{coq:version.minor}
%{coq:version.suffix}
  • close https://github.com/ocaml/dune/pull/5967
  • close https://github.com/ocaml/dune/pull/5913

Alizter avatar Aug 07 '22 18:08 Alizter

@ejgallego ping

Alizter avatar Sep 03 '22 11:09 Alizter

Looks very good to me, thanks! I can do a full code review next week after I'm done with the Sabanci class, but if someone else wants to take over, the interface for this PR looks good to me so you can merge.

Need to update the docs and changelog I think.

ejgallego avatar Sep 04 '22 12:09 ejgallego

Also %{coq:coq_native_compiler_default} could be maybe named a bit differently? The flag really means that coqc was configured to output native files by default. But still you can use the native compiler when this flag in configure was not passed.

It is a hack so people could have coq_makefile output native files just by recompiling coq.

ejgallego avatar Sep 04 '22 12:09 ejgallego

Also %{coq:coq_native_compiler_default} could be maybe named a bit differently? The flag really means that coqc was configured to output native files by default. But still you can use the native compiler when this flag in configure was not passed.

It is a hack so people could have coq_makefile output native files just by recompiling coq.

We can name it whatever we want, I just kept the env var name from configure.

Alizter avatar Sep 05 '22 08:09 Alizter

@ejgallego ping

Alizter avatar Sep 18 '22 21:09 Alizter

@ejgallego I've added a changelog and some doc.

Alizter avatar Sep 19 '22 23:09 Alizter

The expander code is originally @rgrinberg's, but if he has some time, I wouldn't mind another pair of eyes.

Alizter avatar Sep 19 '22 23:09 Alizter