Repository navigation
v1.2.3-pre.2
Pre-release
Pre-release
·
69 commits
to master
since this release
💪 Fixed
- #1385 Fixed the Bullseye plugin’s
report:bullseyetask including Unity, generated test runners, and test files in its HTML and XML reports when run on the same command line as a freshbullseye:build, as inceedling bullseye:all report:bullseye. Its reports now leave out the same sources as automatic reports. With no coverage file yet, it reports that and writes nothing, rather than failing with a license hint. - Fixed one long build path being reported several times, once for each step that created or wrote it. Ceedling now reports each path once.
- Fixed a flood of notices about headers sharing a directory being logged once for every pair of them, on every build and for every test, whether or not anything failed. A directory of 40 headers gave 780 lines. The guidance now appears only when a compilation fails with what looks like a redeclaration or conflicting types, once for each directory holding a header the compiler names, and explains how the collision can arise and how to resolve it.
- #1387 Fixed long configured paths lengthening every build path below them (#1370). A
:pathsroot far outside the project, such as a vendor’s include directory, or nested deep inside it, is now spelled in build paths by a short_<name>_<hash>name, and everything below it keeps its path. Short roots such assrc/are unchanged.build/build_roots.ymllists each shortened root (build output). The first build after upgrading rebuilds everything once. - #1391 Fixed a delta build reusing a test’s Partials after the test changed which functions it selects, such as
TEST_PARTIAL_PUBLIC_MODULEtoTEST_PARTIAL_ALL_MODULE. A change that rewrote only the preprocessed copies a Partial is made from, such as toggling:test_build↳:preprocess_force_fallback, was missed the same way. A Partial now regenerates when either changes.
Partials
- #1384 Fixed a Partial leaving out what its selected functions rely on. A test calling an inline function whose external definition the module’s source provides, with a declaration such as
extern inline int f(void);orint f(void);, failed to link. Selected code calling a function the module only declares, a function the test subtracted to stub, or astatic inlinehelper from the module header failed to compile. A Partial now carries those prototypes and the helpers its selected code uses (what a Partial carries). A mock Partial also no longer mocks such a function, which defined it twice. - Fixed a Partial defining a variable its module declares
extern, which failed to link against the real definition with GCC 10 and later. By default, a Partial now writes a weak definition that the real one overrides (see Added); this behavior is optional. - Fixed tested and mocked Partials dropping part of a function’s return type in certain circumstances.
struct point *f(void)loststruct point,uint8_t *lostuint8_t,unsigned longbecamelong, andconstwas stripped. - Fixed a Partial’s implementation header declaring a variable twice when the module’s header declares it and its source defines it, which
-Wredundant-declsreports. - #1397 Fixed a Partial failing to compile for a module that declares a function pointer without a typedef for its type. A function taking or returning one, and a variable holding one, an array of them or a pointer to an array, now generate correctly whether tested or mocked. A variable whose array size, initializer or string holds a pointer in parentheses, as in
sizeof(*p), is no longer named after that pointer. A function returning a function pointer no longer stops Ceedling with an internal error, and a defined function whose name a Partial can’t read stops the build with a message naming it (function pointers). - #1399 Fixed a Partial taking a struct, union, or enum variable for a type. A variable such as
struct ops g_ops = { 1 };, or an array of them, went into the Partial’s types header, which defined it twice or failed to compile. A function returning a pointer to a struct, followed by a stray;, was taken for a type the same way. A type with an attribute after its closing brace, as in} __attribute__((packed));, was taken for a variable instead and never reached the types header. - #1400 Fixed a Partial misreading several kinds of variable declaration, which left a variable without an extern or wrote one that failed to compile or link. Every variable of a compound declaration now gets an extern, as
g_ydoes inint g_x = 0, g_y;. A name holding$reads whole. A type spelled withtypeof(…),_Atomic(…),_Alignas(…), or_BitInt(…), or with_Bool,_Atomic,_Thread_local, or_Complex, keeps its spelling. An extern keeps its variable’s asm label, as inint g_s __asm__("g_symbol");. Under fallback preprocessing, which remains a best effort, a comment inside a declaration no longer garbles it or stops a Partial reading the rest of the file. - #1402 Fixed a Partial failing to compile for a module whose source includes its own header and then a header that uses the module header’s types or macros. The Partial wrote every include it carries ahead of the module’s types, so the later header met a type or macro not yet defined. A Partial now writes its includes in the order the module’s source compiles them. A mocked Partial’s header among them keeps its place too.
- #1404 Fixed a Partial misreading a declaration with a C23 attribute. A variable that one leads, as in
[[maybe_unused]] static int count;, got an extern that failed to compile, and so did a variable whose name one follows. A function that one leads, as in[[nodiscard]] static int f(void) { … }, was never read, and neither was anything after it in the file. Each now reads whole, and its attribute keeps its place in the Partial. - Fixed a Partial renaming more than a promoted function-scoped
staticvariable. A member or tag of the same name, as inp->count, now keeps its spelling, unless a struct the function defines holds the name. So does the text of a comment or string, apart from an asm template’s%[count].
Preprocessing
- Fixed a mocked header losing a function declaration that follows an empty macro definition, such as
#define CMSIS_DEPRECATED, with:cmock↳:treat_inlines: :include. In the header Ceedling prepares for CMock, the declaration could be joined onto the#define, so no mock was generated for that function. - Fixed a mid-line
_Pragma()being joined into the code around it when Ceedling reassembled a preprocessed file, givingint a; #pragma pack(1) int b;on one line. - Fixed a header’s include guard going unrecognized behind a leading comment longer than 2,048 bytes, such as a license. A header prepared for CMock with
:treat_inlines: :includegot a generated guard instead and repeated the original guard’s#defineas an ordinary macro, and a Partial of such a header could not suppress the original header, riskingredefinitionerrors. A guard-shaped#ifndef/#definepair inside a comment is no longer taken for the guard. - Fixed a system header such as
<stdint.h>being included twice in a header Ceedling prepares for CMock or a Partial, when the compiler’s own copy of that header includes another of the same name.
🌟 Added
- More and better guidance on compilation and linking failures that point to common root causes. More cases are covered with more complete explanations and consistent wording. Failure matching is expanded to help across a variety of toolchains.
- #1386 Added
:project↳:win_path_limitfor Windows.:classic, the default, keeps Windows’ 260-character limit and now also flags a directory Ceedling creates past 248 characters.:long_pathsand:autostop long path logging warnings/errors on a host with long paths enabled, after checking once that Ruby can work with long paths. If that check fails, the new optional:windows_registry_querytool reads the host’s registry setting to name the cause. On Ruby before 4.0, which can create long paths but not list them,:autokeeps the classic limit, and:long_pathswarns once about what can fail. The setting changes only what Ceedling reports. - Added
:partials↳:suppress_redundant_decls. Enabled by default, it wraps the prototypes a Partial carries in GCC diagnostic pragmas, so-Wredundant-declsstays quiet where a carried prototype repeats a header’s declaration. - Added
:partials↳:extern_variablesfor a variable a module declaresexternbut never defines.:weak, the default, writes a weak definition in the Partial, so a test built with GCC or Clang links whether or not it links the defining module.:testwrites none, leaving the definition to the test.