Skip to content

Conversation

@jvdp1
Copy link
Member

@jvdp1 jvdp1 commented Oct 30, 2025

Based on #1031, #1033
Closes #1049

Here is a proposition to modularize stdlib using cpp directives (instead of fypp) based on this comment

\cc: @eduardz1 @jalvesz @perazz

@jvdp1
Copy link
Member Author

jvdp1 commented Oct 30, 2025

here is a proposal (to replace #1049) that relies only on the CPP directives.
The code using bitsets is always generated and encapsulated between the cpp directive STDLIB_BITSET.

@jalvesz : I didn't look carefully to fypp_deployment.py as it results in many errors on my computer. If we are all happy, I can have a look later.

@jvdp1 jvdp1 requested review from jalvesz and perazz October 30, 2025 20:25
@jalvesz
Copy link
Contributor

jalvesz commented Nov 1, 2025

Thanks for this new approach @jvdp1. One question though, I didn't see the header file defining the default value of the internal define parameter. If so, one would be obliged to pass a flag even when building with a compiler that does support it, right?

@jvdp1
Copy link
Member Author

jvdp1 commented Nov 1, 2025

One question though, I didn't see the header file defining the default value of the internal define parameter. If so, one would be obliged to pass a flag even when building with a compiler that does support it, right?

Sorry I forgot about it. I will add one, such that the default is the compilation of bitsets.

@jvdp1
Copy link
Member Author

jvdp1 commented Nov 1, 2025

@jalvesz : I added a file macros.inc, such that the default is the compilation of the whole stdlib (i.e., including stdlib_bitsets. The user must pass the flag STDLIB_NO_BITSET to avoid its compilation.

However, I think that the file macros.inc is not required if the directive
#ifdef STDLIB_BITSET
is replaced by
#ifndef STDLIB_NO_BITSET

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.13%. Comparing base (fffe0d7) to head (7b1b1ea).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1050      +/-   ##
==========================================
+ Coverage   25.12%   25.13%   +0.01%     
==========================================
  Files         570      570              
  Lines      234201   234201              
  Branches    41277    41275       -2     
==========================================
+ Hits        58838    58872      +34     
+ Misses     175363   175329      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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