Skip to content

[new release] atd (10 packages) (2.16.0)#27308

Merged
mseri merged 6 commits intoocaml:masterfrom
mjambon:release-atd-2.16.0
Jan 27, 2025
Merged

[new release] atd (10 packages) (2.16.0)#27308
mseri merged 6 commits intoocaml:masterfrom
mjambon:release-atd-2.16.0

Conversation

@mjambon
Copy link
Copy Markdown
Contributor

@mjambon mjambon commented Jan 23, 2025

Parser for the ATD data format description language

CHANGES:

CHANGES:

* atdgen: Breaking change, migrate from Bucklescript to Melange (ahrefs/atd#375)
* atdd: Workaround d compiler bug regarding declaration order when using aliases (ahrefs/atd#393)
        Algebraic data types (SumType) now uses `alias this` syntax.
* atdgen: Add support for `<json open_enum>` in Melange (ahrefs/atd#401)
* atdcpp: Initial Release (ahrefs/atd#404)
* atdcpp: Use `double` c++ type as default floating point type (ahrefs/atd#411)
* atdgen: Fix JSON I/O for inline records (ahrefs/atd#419)
* atdgen: The deprecated `atdgen` library is no longer available.
          Use `atdgen-runtime` instead (ahrefs/atd#421)
* atddiff: To ensure that all the intended types are checked when new
           type definitions are added to an ATD file, an `--ignore`
           option is now available. It makes atddiff fail if some types
           are neither selected via `--types` nor ignored via `--ignore`.
@mjambon
Copy link
Copy Markdown
Contributor Author

mjambon commented Jan 23, 2025

The errors in the reverse dependencies such as "azure-cosmos-db.0.1.2 (failed: Library "atdgen" not found.)" are due to the deprecated library atdgen which is now known as atdgen-runtime. This rename+deprecation took place in 2018.

Here are things we can do:

  1. Edit all the affected opam files in opam-repository. Ideally, contact the package maintainers about the change. However, end-users depending on the atdgen library will have to make the change by themselves.
  2. Revert the change in atd so as to keep providing atdgen as an alias for atdgen-runtime.

Update: solution (1) won't work because it's not an issue with the atdgen package but the atdgen library. The atdgen package provides an atdgen executable and depends on the atdgen-runtime package which provides the atdgen-runtime library but no longer provides an atdgen library. The build fails for various opam packages because they list atdgen as a library in dune or other build files instead of atdgen-runtime.

Adding the constraint atdgen-runtime < 2.16.0 to the opam files of the affected packages would fix opam installs. I'll do this unless someone thinks we should go with (2), a reversion.

@mseri
Copy link
Copy Markdown
Member

mseri commented Jan 23, 2025

Adding the constraint atdgen-runtime < 2.16.0 to the opam files of the affected packages would fix opam installs. I'll do this unless someone thinks we should go with (2), a reversion.

I'd go with this

@mseri
Copy link
Copy Markdown
Member

mseri commented Jan 23, 2025

opam admin add-constraint --packages=COMMA_SEPARATED_LIST_OF_PACKAGES "atdgen-runtime<2.16.0"

@mjambon
Copy link
Copy Markdown
Contributor Author

mjambon commented Jan 23, 2025

opam admin add-constraint --packages=COMMA_SEPARATED_LIST_OF_PACKAGES "atdgen-runtime<2.16.0"

Fantastic. Let's see if what I did works.

I left detailed upgrade instructions in the git commit and I'll copy them to atd's release page for more visibility.

@mjambon
Copy link
Copy Markdown
Contributor Author

mjambon commented Jan 23, 2025

Of course, I messed up the upgrade instructions left in the git commit. I'm going to amend the commit once and hope it will be good enough.

The 'atdgen' package no longer provides an 'atdgen' library
which was providing an 'Atdgen' module (it's been deprecated since
2018). The equivalent module is 'Atdgen_runtime'. Upgrade instructions:

- module level: if your source code references 'Atdgen', change it to
  'Atdgen_runtime'.
- library level: in dune files and other build files, change references
  to the 'atdgen' library to 'atdgen-runtime'.
- package level: [optional] in opam files or dune-project files used to
  derive opam files, we recommend that you depend only on the 'atdgen'
  package at build time and add a dependency on the 'atdgen-runtime'
  package as follows. Here's the syntax for an opam file:

    depends: [
      ...
      "atdgen" {build}
      "atdgen-runtime"
      ...
    ]

  or with a version constraint:

    depends: [
      ...
      "atdgen" {build & = "123.456.789"}
      "atdgen-runtime" {= "123.456.789"}
      ...
    ]

  If the opam file is derived from a dune-project file, the syntax is:

    (package
      ...
      (depends
        ...
        (atdgen :build)
        atdgen-runtime
        ...
      )
      ...
    )

  or with a version constraint:

    (package
      ...
      (depends
        ...
        (atdgen (and :build (= 123.456.789)))
        (atdgen-runtime (= 123.456.789))
        ...
      )
      ...
    )
@mjambon mjambon force-pushed the release-atd-2.16.0 branch from ff51f96 to 5fbe2b4 Compare January 23, 2025 19:17
> Error in sanddb.0.2: warning 61: `with-test` variable in `run-test` is
> out of scope, it will be ignored
> Error in azure-cosmos-db.0.1.2: warning 37: Missing field 'dev-repo'
@mjambon
Copy link
Copy Markdown
Contributor Author

mjambon commented Jan 23, 2025

I think I fixed all the opam lint errors in the reverse dependencies. I didn't try to fix the warnings.

@mjambon
Copy link
Copy Markdown
Contributor Author

mjambon commented Jan 23, 2025

I made edits to suppress the "warnings" that cause the lint job to fail.

@mseri
Copy link
Copy Markdown
Member

mseri commented Jan 25, 2025

Thanks, I am going to send a separate PR to fix the remaining issues on monday and then merge this. Sorry for the wait

@mjambon
Copy link
Copy Markdown
Contributor Author

mjambon commented Jan 26, 2025

thank you!

@mseri
Copy link
Copy Markdown
Member

mseri commented Jan 27, 2025

Merging this to avoid conflicts in the separate PR

@mseri mseri merged commit d2f70af into ocaml:master Jan 27, 2025
@mseri mseri mentioned this pull request Jan 27, 2025
@MSoegtropIMC
Copy link
Copy Markdown
Contributor

MSoegtropIMC commented Jan 28, 2025

Please ignore - see below

Please note that apparently this PR broke the CI of Coq Platform for legacy Coq (8.16 ad 8.17). This CI did run daily for 2 years and broke yesterday. See

https://github.com/coq/platform/actions/runs/13001587725/job/36261164331#step:5:1192
https://github.com/coq/platform/actions/runs/13001587725/job/36261164464#step:5:1174
https://github.com/coq/platform/actions/runs/12989865494/job/36253629718#step:5:1192

┌─ The following actions failed
│ λ build elpi 1.16.9
└─ 

@gares : FYI

@gares
Copy link
Copy Markdown
Contributor

gares commented Jan 28, 2025

We can probably just put an upper bound

@MSoegtropIMC
Copy link
Copy Markdown
Contributor

Sorry for the confusion: this PR introduces an upper bound, so it fixes the problem. The issue with Coq Platform CI is that it has a patched opam package for elpi 1.6.9 to improve build reliability and I need to update the local patch. I checked if I have a local patch. but somehow looked in the wrong repo.

@MSoegtropIMC
Copy link
Copy Markdown
Contributor

So my fault - all is well.

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.

4 participants