Repository navigation
Land benchmarks, faster rendering, site and README; adopt swift-llm-check 0.5.0 - #35
Merged
Merged
Conversation
Move renderSingleTarget, generateTargetsSection and the dependency graph metrics into PackagePlugin-free files that report warnings through a closure, and add renderPackageContent for the whole generated text. The tests now link them and cover the rendered file byte for byte. Output is unchanged.
A separate Benchmarks/ package links the plugin's PackagePlugin-free files and measures config decoding, import filtering, the dependency graph and rendering on a synthetic 1,000-target project. Includes the p50 and hotspots tools and scripts/profile.sh. CI builds the benchmarks.
Compute each target's pragma-mark group once instead of in the sort comparator, build the Apple SDK set once instead of per target, and count local dependencies without building arrays. Output is byte for byte the same. Document the benchmarks and results in docs/performance.md.
site/index.html explains the plugin and its companion CLI, with a real config, the output it produces, and the install snippet for 1.0.5. .github/workflows/pages.yml deploys site/ from main.
Add badges and links to the website, the CLI, performance and architecture rules docs; state the requirements; install from 1.0.5; fix the leaf info, pragma mark and unresolved-import examples to match the real output; replace the stale Yams troubleshooting tip; add a Development section.
- `xcTestImports` and `disabledTests` come from the library; the local copies and their detector tests are gone. - `.llm-check.yaml` no longer excludes the `Shared` folders: with `symbolicLinks: follow` the codebase reads the links and `SourceFile.symbolicLinkDestination` says where each points, which replaces `SharedSource` and `Detect.unlinkedTestSources`. The benchmarks' own code stays excluded. - `SourceFile` is not a `Finding`, so the link rule maps each offending file to a `Violation` instead of calling `expectAll` on the files. Rule ids, titles and rationales are unchanged, so docs/architecture-rules.md is too.
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.
Why
#32, #33 and #34 were stacked on each other's branches and each was merged into its parent branch, not
main.main(9ba4469) has only #31 (architecture rules and CI), so1.0.6, tagged frommain, has none of the benchmarks, rendering speedups, site or README work. Everything from those PRs is ondocs/readme-and-metadata. This PR merges that branch intomain(it merged cleanly, and the result is identical to the branch), then adds two small commits.What's in it
Benchmarks/package (package-benchmark) with a profiling script,docs/performance.md, and the rendering changes it measured. The renderedPackage.swiftis byte-for-byte the same.site/index.htmland.github/workflows/pages.yml.1.0.6in the README and on the site. They said1.0.5.Architecture/(test-only, not shipped):xcTestImportsanddisabledTestsnow come from the library. The local copies and their detector tests are deleted..llm-check.yamlno longer excludes theSharedlink folders. WithsymbolicLinks: follow,SourceFile.symbolicLinkDestinationdoes the job of the hand-writtenSharedSourcefile-system walk.docs/architecture-rules.mdis unchanged too.Package.swiftstill pinspackage-generator-cli0.7.0 (URL and checksum unchanged frommain). CLI release 0.7.1 has no artifact bundle attached, so there is nothing newer to point at yet.Performance
Rendering a 1,000-target
Package.swifton Apple silicon, release build, p50, before → after (fromdocs/performance.md):Verified locally
swift build --build-tests && swift test: 27 tests pass.swift test --package-path Architecture: 15 tests pass. As a check, I replaced one benchmarkSharedlink with a copy, andtest-sources-link-the-plugin-filesfailed on it.swift build --package-path Benchmarksbuilds.After merge
Cut the release so the perf work ships:
gh release create 1.0.7 --target main --title 1.0.7 --notes "Renders Package.swift about 5x faster with 4x fewer allocations on a 1,000-target package (output byte-for-byte unchanged). Adds a Benchmarks package, a GitHub Pages site and a refreshed README. These changes were meant for 1.0.6 but were merged into stacked branches instead of main."Once this is merged, these branches can be deleted:
chore/architecture-rules,perf/benchmarks,docs/github-pages,docs/readme-and-metadata.