Skip to content

Simplify assert subroutine and support LFortran #56

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

rouson
Copy link
Contributor

@rouson rouson commented Jun 16, 2025

The primary motivation of this PR is simplifying the assert subroutine by removing the optional diagnostic_data argument, the utility of which is largely displaced by Julienne's new assertion feature, which automatically generates and embeds diagnostic information in thedescription argument when calling Assert's.

Towards this end, this PR removes

  1. The assert subroutine's diagnostic_data argument,
  2. Types that existed solely to support the removed argument:
    a. characterizable_t
    b. intrinsic_array_t,
  3. Programs or parts of programs that referenced the aforementioned argument or types in the example directory, and
  4. Documentation that referenced the removed entities in the doc directory

A secondary motivation for this PR is supporting the LFortran compiler, which has strategic importance related to upcoming work. The README.md in the root directory has been reorganized and updated to include instructions for building and testing with lfortran.

All tests in this PR pass when run in a single image locally with flang-new, gfortran, ifx, lfortran, and nagfor.

Because this PR introduces a breaking change, semantic versioning suggests it be released as version 3.0.0.

This commit
1. Removes the diagnostic_data argument from the assert subroutine
2. Removes the types that existed solely to support that argument:
   a. characterizable_t
   b. intrinsic_array_t
3. Edits or deletes examples that referenced the removed entities
4. Edits or deletes documentation that referenced removed entities
@rouson rouson requested a review from bonachea June 16, 2025 01:14
@bonachea bonachea changed the title Assert 3.0.0: Simplified assert subroutine Simplify assert subroutine, removing diagnostic_data argument and related code Jun 16, 2025
@bonachea
Copy link
Member

@rouson Thanks for this PR.

I would like the opportunity to review this PR in detail before merge, but given several impending deadlines I might not have time until next week. Is there a particular deadline for this change?

On a related note, I agree that a breaking change probably motivates a new major version once the changes are eventually packaged into a release. However this PR is not actually creating that release, so I've renamed the PR accordingly. I've been separately working on some orthogonal changes I'd also like to see in the next Assert release, hopefully those will reach PR later this month.

@rouson rouson changed the title Simplify assert subroutine, removing diagnostic_data argument and related code Simplify assert subroutine and support LFortran Jun 20, 2025
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