Repository navigation
2042 follow-ups: size and lib_deps warnings in the build log, decode encoded /tree/ refs, rename tasmota_platform_tag - #2074
Merged
Merged
Conversation
…ew_with_perf Extract the #1407 ignored-version-pin warnings into log_config_warnings / log_ignored_version_pins, with the platform and package tables as their own functions, so the next commit can add a config warning without growing new_with_perf (#[expect(too_many_lines)]). No behaviour change. Part of #2042
A /tree/<ref> or /archive/<ref>.zip lib_deps URL copied from a browser can carry an encoded ref (feature%2Fx). archive_url() percent-encodes each ref segment, so the ref was encoded twice (feature%252Fx) and the download 404'd. Decode the path-derived ref before validating it; a malformed escape or non-UTF-8 result is rejected like any malformed URL. The #<ref> form is a literal ref and is left as is. Part of #2042
…s in the build log Both warnings went only through tracing::warn, so they reached the daemon log but not the build output the CLI streams. - SizeInfo gains ram_warning (serde-optional, omitted when None). from_elf_sections_with_ram sets it from ram_sections_missing, so every ELF-based size report (default, ESP32 DRAM set, Renesas) carries it, and log_size_report pushes "Warning: size report: ..." next to the Flash/RAM lines. The no-op fast path re-logs the stored SizeInfo the same way. - library_manager::skipped_lib_dep_warnings returns the message parse_lib_specs already traces for every lib_deps entry it skips. BuildContext pushes each as "Warning: ..." beside the existing ignored-version-pin warnings, the established path for config warnings (#1407). - The RAM-overflow warning was already in the build log ("Warning! The data size ...", log_size_report since #1473); the new build_output test pins that too. ci13xx builds through its own recipe without a streamed BuildLog, so it is not covered. Fixes #2042
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The last group of #2042 (group 5: item 5 and the
tasmota_platform_tagrename), plus the build-log leftovers from groups 1 and 2 and one lib_deps leftover.Item 5: crate-scoped clippy vs workspace clippy
This doesn't reproduce on current
main. PR #2059 already fixed it by enablingtracing/logworkspace-wide, sofbuild-core's#[expect(clippy::cognitive_complexity)]inusb/data.rsis fulfilled no matter which crates are selected. These all exited 0 on this branch, whereusb/data.rsand everyCargo.tomlmatchmain:soldr cargo clippy -p <crate> --all-targets -- -D warningsfor fbuild-core, fbuild-build-arm, fbuild-library, fbuild-serial, fbuild-paths, fbuild-build-engine, fbuild-build-esp, fbuild-config and fbuild-build-mcusoldr cargo clippy --workspace --all-targets -- -D warningsci/hooks/lint.pyruns./lint <file>, which runs exactlysoldr cargo clippy -p <crate> --all-targets -- -D warnings, so the hook path is the one checked above. No code change was needed.Commits
tasmota_platform_tagtoesptool_release_platform_tag. Since fix(esptool): fall back to the pinned pioarduino release and report the source error #2063 it builds pioarduino release tags. The commit also takes "tasmota" out of thetool-esptoolpydoc comment and out of some made-up test cache paths. No behaviour change. Tests that describe the tasmota regression keep their names.platformand inplatform_packages#1407) out ofBuildContext::new_with_perf, which has#[expect(too_many_lines)], intolog_config_warnings/log_ignored_version_pins. The platform and package tables become their own functions, which keeps the new helper under the 100-line limit. No behaviour change./tree/<ref>or/archive/<ref>.zipURL whose ref is already percent-encoded (feature%2Fx) was encoded a second time (feature%252Fx). The ref taken from the URL path is now decoded first. A bad escape or a result that isn't UTF-8 is rejected like any other malformed URL.#<ref>refs are left alone.SizeInfohas a newram_warningfield (serde(default, skip_serializing_if)), set byfrom_elf_sections_with_ram.log_size_reportprints it asWarning: size report: .... This covers the default, ESP32 and Renesas reports, and the no-op fast path, which logs the storedSizeInfoagain.library_manager::skipped_lib_dep_warningsreturns the same messageparse_lib_specsalready traces.BuildContextwrites each one to the build log asWarning: ..., the same way it writes the A pinned platform version is silently ignored — inplatformand inplatform_packages#1407 config warnings.Warning! The data size ..., added in fix(build): fail oversize images, compile only reached lib/ libraries, warn on ignored version pins #1473). A new test now checks for it.Fixes #2042
Tests
RED first, then GREEN:
fbuild-core elf_size::tests::size_info_carries_the_missing_ram_warningfbuild-build-engine build_output::tests::size_report_warnings_reach_the_build_logfbuild-build-engine pipeline::context::tests::skipped_lib_deps_are_warned_in_the_build_logfbuild-library library::github_source::tests::percent_encoded_web_url_ref_is_decoded_onceFull suites:
soldr cargo test -p fbuild-core: 407 passed-p fbuild-library: 361 passed-p fbuild-build-engine: 591 + 1 passedfmt --checkand workspace clippy pass.E2E
With
FBUILD_DEV_MODE=1, I ran a dev build of this branch'sfbuild-cliandfbuild-daemonon anunoblink whoselib_depsishttps://gitlab.com/owner/somelib.git#v1.0. The CLI output (fbuild build . -e uno) shows the warning:Not done
fbuild sync(fbuild-config/src/lib_source.rs) still records/tree/<ref>and/archive/...URLs asgithubwith no ref. It can't callGitHubSource::parse_web_urldirectly, becausefbuild-librarydepends onfbuild-config, not the other way round. The daemon's/api/ide/librariesendpoint also sharesclassify, so patching the CLI alone would make the two disagree. The fix is to move the URL-shape parser down intofbuild-configand have both callers use it, which means a cross-crate move and a decision about the lock-file format. The lock is audit-only, so I've left it.BuildLog, so the new lib_deps warning doesn't appear there. Itsparse_lib_specscall still traces it.