Repository navigation
Fortran: a binding to the corvus-json-schema C library - #1039
Merged
Merged
Conversation
src-fortran/corvus-json-schema: the module corvus_json_schema, over
ISO_C_BINDING. validator_t, options_t, document_t and collector_t hold
the C library's handles and free them when they are finalized; a
validator_t may be assigned (a clone of the handle), the others may not
be copied. Procedures that can fail take stat and errmsg, as the
intrinsic statements do. Custom formats and the resolver are Fortran
procedures, called through bind(c) trampolines that carry them in the
callback's user data.
The tests (fpm test): the JSON-Schema-Test-Suite as JSON text, as a
document and through a verbose collector (7,893 cases and 73 leap-second
cases skipped, 7,966 in all), the annotation suite (217/217), compared
by validating against {"const": ...}, and the API (79 checks), with
gfortran 14 -std=f2018 -fcheck=all against C library 0.1.4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
…ngth argument passed on (gfortran 11) gfortran 11 crashes (SIGSEGV) passing an optional character(:), allocatable, intent(out) argument on to another procedure, so errmsg came back empty through report. Every test passes on gfortran 11.5 and 14.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
…led package config) and an example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
- fortran.yml: fpm tests with gfortran 11 and 14 on Linux, gfortran on macOS and Intel ifx on Linux and Windows, against the latest C library; version checks; the CMake build, its tests, an install and a project that uses it; an fpm project that depends on the package. - fortran-publish.yml: publishes src-fortran/corvus-json-schema to corvus-dotnet/corvus-json-schema-fortran (fpm needs fpm.toml at the root of the repository it clones), tags v<version> there, creates the release, and tags fortran-v<version> here. - dotnet-changes: src-fortran and the two workflows are not .NET changes. - docs/JsonSchemaForFortran.md (and its descriptor, the home page and Other languages), docs/ReleaseProcess.md "The Fortran binding", the corvus-fortran-binding skill, and the package's README and VERSIONHISTORY.md. - auto_release.yml: quote $GITHUB_PATH (actionlint SC2086, on main). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
.github/skills, .github/copilot-instructions.md and CLAUDE.md take part in no build. dotnet-changes no longer counts them as .NET changes, and has an instructions output for them; a pull request that changes them without a .NET change runs the Code-sample catalog job (the catalog covers their code samples), which the .NET build gate requires where it ran. A change to them makes no NuGet release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
- The C library's paths are added to the ones the compiler's set-up gave: overwriting LD_LIBRARY_PATH lost Intel's oneAPI libraries (libimf.so). - macOS: DYLD_FALLBACK_LIBRARY_PATH, with gfortran's library directory, in place of DYLD_LIBRARY_PATH (the fpm binary links another Homebrew gcc's libgfortran). - Windows: Git Bash's link moved aside, so that ifx links with link.exe. - The library alone builds with every warning an error; the tests on gfortran 11 turn off maybe-uninitialized, which it reports falsely for deferred-length character variables (test/suite_support.f90 no longer has the three it reported). - The fpm consumer project depends on the package by a relative path. - fortran-publish.yml publishes the package's source as the image ghcr.io/corvus-dotnet/corvus-json-schema-fortran:<version> (release-image.yml, package fortran), which the Bowtie harness pins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
…where setup-fpm's path finds it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
…g, not an expression temporary (ifx on Windows puts it on the 1 MB stack) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
Contributor
|
The documentation preview for this pull request has been removed. |
Contributor
Test Results 48 files 48 suites 15m 46s ⏱️ Results for commit eba101d. ♻️ This comment has been updated with latest results. |
The publication repository starts empty, and a clone of an empty repository is left on git's default branch, which need not be main. The first branch pushed there becomes the repository's default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
Our default branch is always main, so no publish step depends on git's default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3
Contributor
Code Coverage Summary Report - Windows (net481)Summary
CoverageCorvus.Json.CodeGeneration - 78.7%
Corvus.Json.CodeGeneration.CSharp - 83.6%
Corvus.Json.ExtendedTypes - 73.9%
Corvus.Json.JsonReference - 73.6%
Corvus.Text.Json - 91.5%
Corvus.Text.Json.CodeGeneration - 73.9%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.8%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.6%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 95%
Corvus.Text.Json.JsonPath.CodeGeneration - 96.1%
Corvus.Text.Json.Patch - 96.5%
Corvus.Text.Json.Toon - 88.2%
Corvus.Text.Json.Validator - 93.7%
Corvus.Text.Json.Yaml - 90.8%
Corvus.Toon.SystemTextJson - 90%
|
Contributor
Code Coverage Summary Report - Linux (net10.0)Summary
CoverageCorvus.Json.CodeGeneration - 80.4%
Corvus.Json.CodeGeneration.CSharp - 84%
Corvus.Json.ExtendedTypes - 76.1%
Corvus.Json.JsonReference - 76.4%
Corvus.Text.Json - 92.5%
Corvus.Text.Json.AsyncApi - 71%
Corvus.Text.Json.AsyncApi.Amqp - 0.2%
Corvus.Text.Json.AsyncApi.AzureServiceBus - 0%
Corvus.Text.Json.AsyncApi.CodeGeneration - 93.5%
Corvus.Text.Json.AsyncApi.Kafka - 0.2%
Corvus.Text.Json.AsyncApi.Mqtt - 0.4%
Corvus.Text.Json.AsyncApi.Nats - 0.2%
Corvus.Text.Json.AsyncApi.Polly - 57.8%
Corvus.Text.Json.AsyncApi.Testing - 96.2%
Corvus.Text.Json.AsyncApi.WebSocket - 0.6%
Corvus.Text.Json.CodeGeneration - 89.6%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.6%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.5%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 94.7%
|
Contributor
Code Coverage Summary Report - Windows (net10.0)Summary
CoverageCorvus.Json.CodeGeneration - 80.5%
Corvus.Json.CodeGeneration.CSharp - 84%
Corvus.Json.ExtendedTypes - 76.1%
Corvus.Json.JsonReference - 76.6%
Corvus.Text.Json - 92.4%
Corvus.Text.Json.AsyncApi - 71%
Corvus.Text.Json.AsyncApi.Amqp - 0.2%
Corvus.Text.Json.AsyncApi.AzureServiceBus - 0%
Corvus.Text.Json.AsyncApi.CodeGeneration - 93.5%
Corvus.Text.Json.AsyncApi.Kafka - 0.2%
Corvus.Text.Json.AsyncApi.Mqtt - 0.4%
Corvus.Text.Json.AsyncApi.Nats - 0.2%
Corvus.Text.Json.AsyncApi.Polly - 57.8%
Corvus.Text.Json.AsyncApi.Testing - 96.2%
Corvus.Text.Json.AsyncApi.WebSocket - 0.6%
Corvus.Text.Json.CodeGeneration - 89.6%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.6%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.5%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 94.7%
|
This was referenced Nov 1, 2026
Open
This was referenced Nov 9, 2026
Merged
Bump Corvus.Json.Validator and meziantou.framework.nugetpackagevalidation.tool
Joseleno/Incognito#75
Merged
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fortran: a binding to the corvus-json-schema C library
src-fortran/corvus-json-schemais the modulecorvus_json_schema, which binds the C library throughISO_C_BINDING. It is the binding planned with the user: a binding like Swift's, not a native port, released through a publication repository like OCaml.The binding
validator_t,options_t,document_tandcollector_thold the C library's handles and free them when they are finalized. Avalidator_tmay be assigned, which clones the handle. The other types stop the program when copied.statanderrmsg, as the intrinsic statements do. Withoutstat, a failure stops the program with its message.bind(c)trampolines that carry them in the callback's user data.CJS_PATTERN_TOO_LARGE, entry point, base URI and depth.characterargument is passed on to another procedure, so every message goes through a local variable. The skill records this.Packaging
fpm.toml, a git dependency) and CMake: the targetcorvus_json_schema::fortran, ctest, and an installed package config over the C library's own CMake package.fortran.yml:capi-vrelease;fortran-publish.ymlpushes the package tocorvus-dotnet/corvus-json-schema-fortran. fpm needsfpm.tomlat the root of the repository it clones. The workflow tagsv<version>there, creates the release, and tagsfortran-v<version>here. The one-time set-up is indocs/ReleaseProcess.md, "The Fortran binding".docs/JsonSchemaForFortran.md, with its descriptor, the home page, Overview and Other languages. Also thecorvus-fortran-bindingskill, and the package's README and VERSIONHISTORY.md (V0.1.0).CI change detection
src-fortranand its workflows are not .NET changes..github/skills,.github/copilot-instructions.md,CLAUDE.md) are no longer .NET changes either, because they take part in no build. A PR that changes them without a .NET change runs a newCode-sample catalogjob, the catalog check alone, which the.NET build gaterequires where it ran. Tested against lists of changed files withghstubbed out.auto_release.ymlquotes$GITHUB_PATH. This was an actionlint SC2086 finding already on main.Verification
Locally, in podman images with fpm 0.13 and C library 0.1.4, using gfortran 11.5 and 14.4 with
-Wall -Wextra -std=f2018 -fcheck=all:{"const": ...}, and the API test shows that this comparison detects a difference.Intel ifx, Windows and macOS are tested by this PR's CI for the first time.
After the merge
fortran-publishneeds the publication repository and thefortranenvironment withFORTRAN_REPOSITORY_TOKEN, as described indocs/ReleaseProcess.md. The Bowtie harness and the jsonschema-benchmark entry are follow-ups in their own repositories.no_release: no NuGet release.🤖 Generated with Claude Code
https://claude.ai/code/session_01FLjSNeTDe88ubnjRrnsEQ3