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

releases FrontC 4.0.0 #18632

Merged
merged 3 commits into from
May 9, 2021
Merged

releases FrontC 4.0.0 #18632

merged 3 commits into from
May 9, 2021

Conversation

ivg
Copy link
Member

@ivg ivg commented May 4, 2021

This release doesn't really introduce any new features but it switches
FrontC to menhir and dune. The switch to menir was required because
the parser has a circular dependency on the lexer and only menhir is
capable of refactoring tokens from the parser. The circular
dependency, on its own, prevented us from upgrading FrontC to dune,
which in turn prevented us from using FrontC in duniverse.

Switching to menhir required some number of tweaks to the grammar,
which might change the behavior of the parser, hence the new
version. We will still support the old version of FrontC (aka stable)
and release bug fixes, but only the 4.x version will receive new
feautures, such as support for the more modern C syntax.

We also added tests and split the package into three subpackages.
The FrontC package is the library with the same contents as
before. And there are also two packages with executables:

  • calipso - a program analysis tool that reduces non-structural
    control flow in C programs;

  • ctoxml - a program that will dump the parser C AST in XML.

The printc executable is no longer installed as its main purpose is
testing and doesn't provide any useful features for the end users, it
just works as cat.

This release doesn't really introduce any new features but it switches
FrontC to menhir and dune. The switch to menir was required because
the parser has a circular dependency on the lexer and only menhir is
capable of refactoring tokens from the parser. The circular
dependency, on its own, prevented us from upgrading FrontC to dune,
which in turn prevented us from using FrontC in duniverse.

Switching to menhir required some number of tweaks to the grammar,
which might change the behavior of the parser, hence the new
version. We will still support the old version of FrontC (aka stable)
and release bug fixes, but only the 4.x version will receive new
feautures, such as support for the more modern C syntax.

We also added tests and split the package into three subpackages.
The FrontC package is the library with the same contents as
before. And there are also two packages with executables:

- calipso - a program analysis tool that reduces non-structural
  control flow in C programs;

- ctoxml - a program that will dump the parser C AST in XML.

The `printc` executable is no longer installed as its main purpose is
testing and doesn't provide any useful features for the end users, it
just works as `cat`.
@camelus
Copy link
Contributor

camelus commented May 4, 2021

Commit: 32c4f8a

A pull request by opam-seasoned @ivg.

☀️ All lint checks passed 32c4f8a
  • These packages passed lint tests: FrontC.4.0.0, calipso.4.0.0, ctoxml.4.0.0

☀️ Installability check (+3)
  • new installable packages (3): calipso.4.0.0 ctoxml.4.0.0 FrontC.4.0.0

ivg and others added 2 commits May 4, 2021 19:06
it looks like that older versions of OCaml do not work, most likely
due to Menhir version (will investigate later, but 4.08.0 is good so far)
@ivg
Copy link
Member Author

ivg commented May 5, 2021

it looks like that all recent PRs are failing on 4.13 when they try bootstrapping dune with

# File "vendor/cmdliner/src/cmdliner.ml", line 195, characters 25-47:
# Warning 6 [labels-omitted]: label errs was omitted in the application of this function.
# cd _boot && /home/opam/.opam/4.13/bin/ocamlopt.opt -c -g -no-alias-deps -w -49 -I +threads memo.ml
# File "src/memo/memo.ml", line 1002, characters 73-74:
# Error: This expression has type 'a but an expression was expected of type i 
#        This instance of i is ambiguous:
#        it would escape the scope of its equation

Copy link
Member Author

@ivg ivg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @kit-ty-kate! But can you please explain why is dune not a build dependency? What am I missing here?

Concerning the version field it is actually coming from the dune-project file, which in turn, requires this field.

@ivg
Copy link
Member Author

ivg commented May 5, 2021

Hmm.. I am experiencing some issues downstream, so I would close this issue until they are resolved. Will be back soon :)

@ivg ivg closed this May 5, 2021
@ivg
Copy link
Member Author

ivg commented May 5, 2021

OK, I am opening it again, false alarm. Was confused with various versions (I wish at some time we will switch to duniverse)

@ivg ivg reopened this May 5, 2021
@ivg
Copy link
Member Author

ivg commented May 6, 2021

Any updates on the This instance of i is ambiguous: error, I see it strikes all recent PR?
Also, any plans to merge us?

@kit-ty-kate
Copy link
Member

Any updates on the This instance of i is ambiguous: error, I see it strikes all recent PR?

This is an error in dune with OCaml 4.13 (currently trunk). It has been fixed in OCaml, and it should stop showing up in a few days

Thanks, @kit-ty-kate! But can you please explain why is dune not a build dependency? What am I missing here?

This is an issue in dune which breaks the whole opam switch in case of a downgrade if everything is not reinstalled. See ocaml/dune#2147 for more details.

Sorry it took so long to merge. Thanks!

@kit-ty-kate kit-ty-kate merged commit 1f1f206 into ocaml:master May 9, 2021
@ivg ivg deleted the release-frontc-4.0.0 branch May 9, 2021 02:27
@ivg
Copy link
Member Author

ivg commented May 9, 2021

Thanks, Kate!

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

Successfully merging this pull request may close these issues.

3 participants