Skip to content

0.26.0: a step program's glob excludes paths, and dist-apk empties its class directories - #60

Open
Sunrisepeak wants to merge 1 commit into
mainfrom
feat/steps-exclude
Open

Sunrisepeak wants to merge 1 commit into
mainfrom
feat/steps-exclude

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

What

  • tools-steps: glob_options::exclude drops a match whose whole path matches one of its patterns. Unlike the finding pattern, * crosses a /, so */platform/ios/App/* drops everything below such a directory at any depth. The cmake backend renders each pattern as an anchored regular expression and filters the matches with list(FILTER ... EXCLUDE REGEX ...).
  • dist-apk: the javac and kotlinc steps empty their class directories before they compile.

Why

  • Exclusion: a step that archives every object of a build except those below one directory has no other way to state that. The case is an iOS application core that leaves out the platform shell's entry object; HuxerUI's rules use find ... ! -path under /bin/sh for it today.
  • Empty class directories: a compiler adds classes and never removes one. A source that left the package therefore kept its class in the directory that d8 lists, and so in the next package. Examples are a library dropped from the graph and a deleted file. This was measured with HuxerUI: a library's inferred Java sources were replaced by an explicit [package.metadata.dist-apk] table without them, and the old class was still dexed until the directory was removed by hand.

Checks

  • tests/all-rules-compile asserts the rendered exclusions: * crossing /, regular-expression characters taken literally, and [!x] as a negated set. Built and run locally on Linux: all-rules-compile ok.
  • The rendered filter was run under cmake -P over a tree with an obj/app/platform/ios/App/main.mm.o: only the other objects remain.

Version 0.26.0. The docs tools-steps.md and dist-apk.md are updated, and the README and plugin-development examples now name 0.26.0.

…s class directories

glob_options::exclude drops a match whose whole path matches a pattern, where
`*` crosses a `/`: a step that archives every object of a build except the
ones below one directory (an application core without the platform shell's
entry) has no other way to say so. The cmake backend renders each pattern as
an anchored regular expression filtering the matches.

dist-apk's javac and kotlinc steps empty their class directories before they
compile. A compiler adds classes and never removes one, so a source that left
the package -- a library dropped from the graph, a file deleted -- kept its
class in the directory d8 lists, and in the next package.
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.

1 participant