-
Notifications
You must be signed in to change notification settings - Fork 2
Prepare Release of Version 12.1.0 #13
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
lyrahgames
wants to merge
32
commits into
master
Choose a base branch
from
release/12.1.0
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
a20290e
Change version to 12.1.0-a.0.z
lyrahgames a3d26a1
Update upstream submodule to 12.1.0
lyrahgames 59a0c87
Move `README.md` to repository root
lyrahgames 2d96531
Add upstream's readme, license, and changelog
lyrahgames d81da49
Tweak `manifest` files
lyrahgames fd03c87
Disable install of tests package in root buildfile
lyrahgames 716b080
Update configuration variables for better defaults
lyrahgames 8d1e2f6
Use C++20 for unit tests
lyrahgames 90e8f0a
Remove version header generation
lyrahgames da2e192
Reduce and refactor smoke tests
lyrahgames ca28a18
Use all three CI build configs on default targets
lyrahgames dcb0602
Use generated config header for module consumption
lyrahgames 9ac287d
Re-introduce MSVC workaround to fix error C7657
lyrahgames ac28286
Restrict CI builds
lyrahgames 4a2f375
Tweak `buildfile` and explain module configuration
lyrahgames 25cebab
Use `.gitignore` whitelisting
lyrahgames dceb615
Add `module-std-headers` CI build config
lyrahgames a52d6a3
Install documentation to sub-directory
lyrahgames 54f4bb1
Add `PACKAGE-README.md`
lyrahgames 376e994
Make tests library a utility library `libue{}`
lyrahgames dfdbf1c
Describe MSVC bug
lyrahgames 73f45ac
Sanitize execution of unit tests
lyrahgames 437a07a
Write `README.md` following packaging guidelines
lyrahgames 4119d71
Add `buildfile` comments to explain build
lyrahgames c8c502d
Refactor smoke tests
lyrahgames 9353cd4
Remove `config.fmt.disable_import_std`
lyrahgames 55b7b35
Restrict GCC versions in CI builds
lyrahgames 7eb74b7
Fix FreeBSD `import std;` bug
lyrahgames fffe7d1
Update issues and notes in `README.md`
lyrahgames a8c2893
Remove explicit MSVC `/utf-8` flag
lyrahgames 9c24b4c
Remove directory glob in root `buildfile`
lyrahgames 241ca4e
Tweak `PACKAGE-README.md`
lyrahgames File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,51 @@ | ||
| .bdep/ | ||
| .vs/ | ||
|
|
||
| # Local default options files. | ||
| # | ||
| .build2/local/ | ||
|
|
||
| # Compiler/linker output. | ||
| # | ||
| *.d | ||
| *.t | ||
| *.i | ||
| *.ii | ||
| *.o | ||
| *.obj | ||
| *.so | ||
| *.dll | ||
| *.a | ||
| *.lib | ||
| *.exp | ||
| *.pdb | ||
| *.ilk | ||
| *.exe | ||
| *.exe.dlls/ | ||
| *.exe.manifest | ||
| *.pc | ||
| # Use whitelisting and ignore everything by default. | ||
| # | ||
| * | ||
|
|
||
| # Don't ignore directories. | ||
| # | ||
| !*/ | ||
|
|
||
| # Don't ignore Git-specific files. | ||
| # | ||
| !.git* | ||
|
|
||
| # Allow all files from upstream sources. | ||
| # | ||
| !upstream | ||
|
|
||
| # Don't ignore license and documentation files. | ||
| # | ||
| !*.md | ||
| !LICENSE | ||
|
|
||
| # Don't ignore default C++ file extensions. | ||
| # | ||
| !*.h | ||
| !*.c | ||
| !*.cc | ||
| !*.inl | ||
|
|
||
| # Don't ignore source generation files. | ||
| # | ||
| !*.in | ||
|
|
||
| # Add original source files that might have been changed. | ||
| # | ||
| !*.orig | ||
|
|
||
| # Don't ignore standard build2 files. | ||
| # | ||
| !buildfile | ||
| !bootstrap.build | ||
| !export.build | ||
| !root.build | ||
| !*manifest | ||
| !*testscript | ||
|
|
||
| # Allow specific symbolic links to directories. | ||
| # | ||
| !fmt/fmt/include | ||
| !fmt/fmt/src | ||
| !fmt/doc | ||
| !fmt-tests/basics/test | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| upstream/LICENSE |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # build2 Package Repository for {fmt} | ||
|
|
||
| This is a [build2](https://build2.org) package repository for [{fmt}](https://fmt.dev/), a modern C++ formatting library that provides a safe replacement for the `printf` family of functions. | ||
|
|
||
| | Package | Summary | Status | | ||
| |---|---|---| | ||
| | **[`fmt`](fmt/PACKAGE-README.md)** | C++ Formatting Library | [](https://cppget.org/fmt) [](https://queue.cppget.org/fmt) | | ||
|
|
||
| ## Usage | ||
| If you want to use the `fmt` package in your `build2`-based project, add an appropriate repository manifest to your project's `repositories.manifest` and refer to [`fmt`'s PACKAGE README](fmt/PACKAGE-README.md). | ||
|
|
||
| ### `repositories.manifest` | ||
| To be able to fetch the package, add one of the following prerequisites to your project's `repositories.manifest`. | ||
|
|
||
| **Option A: `cppget.org` (Recommended)** | ||
|
|
||
| Based on your project's stability requirements, choose either the [`stable` section](https://cppget.org/?about#pkg%3Acppget.org%2Fstable) for thoroughly tested versions or the [`testing` section](https://cppget.org/?about#pkg%3Acppget.org%2Ftesting) for the latest releases before they are marked as stable. | ||
| For example: | ||
|
|
||
| : | ||
| role: prerequisite | ||
| location: https://pkg.cppget.org/1/stable | ||
| # trust: ... | ||
|
|
||
| **Option B: Git Repository** | ||
|
|
||
| : | ||
| role: prerequisite | ||
| location: https://github.com/build2-packaging/fmt.git | ||
|
|
||
| ## Development Setup | ||
| The development setup for this repository uses the standard `bdep`-based workflow. | ||
| For general information and guidance on package maintenance, please see the [`build2` Documentation](https://build2.org/doc.xhtml). | ||
|
|
||
| First, clone the repository via SSH or HTTPS. | ||
|
|
||
| git clone --recurse https://github.com/build2-packaging/fmt.git # HTTPS | ||
| git clone --recurse git@github.com:build2-packaging/fmt.git # SSH | ||
|
|
||
| Inside the repository's directory, initialize your build configuration. | ||
|
|
||
| bdep init -C @gcc cc config.cxx=g++ config.cxx.features.modules=true config.install.root=../.install config.dist.root=../.dist | ||
|
|
||
| Afterwards, use `b` or `bdep` to build, test, install, and distribute the packages. | ||
|
|
||
| ## Issues and Notes | ||
| - To generate a Binary Module Interface (BMI) from {fmt}'s C++ module after installation, the consumer must compile the module interface unit using the same macro configuration as the original library build. These macros are internal to the module and are therefore not exported via `cxx.export.poptions`. Instead, a generated `config.h` header encapsulates the required configuration through preprocessor macros. The module interface unit is patched to include this header immediately after `module;` in the global module fragment, ensuring the correct macros are available during BMI generation. | ||
| - In non-modular compiled builds, `fmt/format-inl.h` acts as a private implementation header for `src/format.cc`. While its installation in this specific configuration is technically unnecessary, we do not explicitly exclude it to reduce complexity. | ||
| - C++ module support in GCC versions prior to 16 is incomplete and unreliable for this library. As a result, such configurations are considered unsupported and are excluded from CI. | ||
| - On FreeBSD 15 with Clang 19, there is a discrepancy between compiler capabilities and system libraries. Although `__cpp_lib_modules` is defined (indicating that libc++ has module support), the base system does not ship the required module source or metadata files. Consequently, `import std;` is not functional in this environment which is reflected in the generated `config.h`. | ||
| - Upstream unit tests currently only support C++20 and fail when compiled with newer language standards. Therefore, the `fmt-tests` package is explicitly restricted to `cxx.std = 20`. | ||
| - Currently, unit tests are only run when the library headers are available and not when `config.fmt.module_only=true`. The unit tests use standard header includes rather than module imports. | ||
| - A known [issue in MSVC](https://developercommunity.visualstudio.com/t/Separate-preprocessing-with-P-fails-wit/10707183) prevents correct processing of {fmt}'s C++ module, producing error C7657 (“private module fragment cannot be declared before a module declaration”). The workaround (`cc.reprocess=true`) is only applicable when consuming the package directly via `build2`. As a result, unit tests fail on Windows when using the installed package. | ||
|
|
||
| ## Contributing | ||
| Contributions are welcome and greatly appreciated! | ||
| Please start by [opening an issue](https://github.com/build2-packaging/fmt/issues) to report a bug, suggest an improvement, or request a version update. | ||
| This helps us coordinate efforts and avoid duplicate work. | ||
| You are then welcome to submit a [pull request](https://github.com/build2-packaging/fmt/pulls) that references the issue. | ||
| For guidance on package maintenance, please see the [`build2` Packaging Guidelines](https://build2.org/build2-toolchain/doc/build2-toolchain-packaging.xhtml). |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| # Glue buildfile that "pulls" all the packages in the project. | ||
| # | ||
| import pkgs = [dir_paths] $process.run_regex(\ | ||
| cat $src_root/packages.manifest, '\s*location\s*:\s*(\S+)\s*', '\1') | ||
| import pkgs = fmt/ | ||
| import tests = fmt-tests/ | ||
|
|
||
| ./: $pkgs | ||
| ./: $tests: install = false |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../upstream/ChangeLog.md |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../upstream/LICENSE |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../fmt/PACKAGE-README.md |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../upstream/README.md |
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Redirect stdout to stderr (1>&2) and let stderr through (2>|). | ||
| # Cleanup anything the test might create, recursively (&***). | ||
| # | ||
| $* 1>&2 2>| &*** |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| # | ||
| #cxx.internal.scope = current | ||
|
|
||
| cxx.std = latest | ||
| cxx.std = 20 | ||
|
|
||
| using cxx | ||
|
|
||
|
|
||
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../upstream/ChangeLog.md |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../upstream/LICENSE |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # {fmt} - A Formatting C++ Library | ||
|
|
||
| {fmt} is an open-source formatting library that provides a safe replacement for the `printf` family of functions. | ||
| Errors in format strings, which are a common source of vulnerabilities in C, are reported at compile time. | ||
| Formatting of most standard types, including all containers, dates, and times is supported out-of-the-box. | ||
| Also, {fmt} provides portable Unicode support on major operating systems with UTF-8 and char strings. | ||
|
|
||
| # Usage | ||
| To use `fmt` in your project, add the following configurations to the respective files after you have gained access to a `build2` package repository that contains it. | ||
|
|
||
| ### `manifest` | ||
| To make `fmt` available for import, add the following dependency to the `manifest` of each package in your project that requires it, adjusting the version constraint as appropriate. | ||
|
|
||
| depends: fmt ^12.1.0 | ||
|
Klaim marked this conversation as resolved.
|
||
|
|
||
| ### `buildfile` | ||
| To import the contained library, use the following declaration in your `buildfile`. | ||
|
|
||
| import fmt = fmt%lib{fmt} | ||
|
|
||
| Note also that `lib{fmt}` provides `build2` metadata that can be extracted with an immediate importation to describe its configuration. | ||
|
|
||
| fmt.has_header = [bool] (!$config.fmt.module_only) | ||
| fmt.has_module = [bool] $cxx.features.modules | ||
|
|
||
| ### C++ Usage | ||
|
Klaim marked this conversation as resolved.
|
||
| If `$fmt.has_header == true`, {fmt}'s headers can be included as follows: | ||
|
|
||
| ```c++ | ||
| #include <fmt/format.h> | ||
| ``` | ||
|
|
||
| If `$fmt.has_module == true`, {fmt}'s C++ module can imported via: | ||
|
|
||
| ```c++ | ||
| import fmt; | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### C++20 Modules Support | ||
| {fmt}'s C++ module support can be enabled by setting: | ||
|
|
||
| config.cxx.features.modules = true | ||
|
|
||
| By default, the library supports both module import through `import fmt;` and traditional header inclusion through, eg., `#include <fmt/format.h>`. | ||
| To enable this dual usage, all entities are attached to the global module via global module linkage (`extern "C++"`). | ||
| This ensures compatibility between module and header-based consumption. | ||
|
|
||
| To enforce strict module usage, use: | ||
|
|
||
| config.fmt.module_only = true | ||
|
|
||
| In this mode, header access is disabled and all entities are exclusively provided through the C++ module. | ||
| This results in full encapsulation within the module and avoids global module linkage. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.