Skip to content

Remove fmt.tty dependency with Stdlib - #1711

Open
andrjohns wants to merge 1 commit into
stan-dev:masterfrom
andrjohns:fmt-tty
Open

andrjohns wants to merge 1 commit into
stan-dev:masterfrom
andrjohns:fmt-tty

Conversation

@andrjohns

@andrjohns andrjohns commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

stanc currently uses the fmt.tty library to setup terminal outputs and formatting but this pulls in base-unix as a runtime dependency. This PR removes the fmt.tty dependency in favour of a small helper providing the same formatting and setup

Release notes

Removed fmt.tty dependency

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.48%. Comparing base (67a036e) to head (b812e64).

Files with missing lines Patch % Lines
src/stanc/stanc.ml 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1711      +/-   ##
==========================================
- Coverage   92.50%   92.48%   -0.03%     
==========================================
  Files          69       69              
  Lines       10367    10374       +7     
==========================================
+ Hits         9590     9594       +4     
- Misses        777      780       +3     
Files with missing lines Coverage Δ
src/stanc/stanc.ml 84.05% <62.50%> (-3.04%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WardBrian

Copy link
Copy Markdown
Member

The name base-unix is a bit misleading because it is really part of the standard library, it’s just conditionally linked. Is there a reason you’d like to avoid this?

@andrjohns

Copy link
Copy Markdown
Contributor Author

Nothing too essential or critical, just exploring the C bytecode bundling again (for stanli). Unix is the only extra library required to be linked in addition to the core runtime (thanks to all of the other dependency removals!), dropping it simplifies the build a little - but only as a nice-to-have, so I'm not too fussed if it's not worth the manual implementation

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.

2 participants