[native_assets_cli] Deprecate output_directory
#2130
Merged
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.
Closes: #2058
Implements
input.outputDirectory
on top ofinput.outputDirectoryShared
in the hook API.New directory structure
.dart_tool/
native_assets_builder/
<package_name>/
<config-checksum>/
input.json
output.json
dependencies.dependencies_hash_file.json
package_config_hashable.json
hook.dill
hook.dill.d
stderr.txt
stdout.txt
out/
<- old output directory, created by SDK (stays here for backwards compatibility purposes)shared/
<package_name>/
build/
(input.outputDirectoryShared
)<config-checksum>/
<- new output directory, created by the hooklink/
(input.outputDirectoryShared
)<config-checksum>/
<- new output directory, created by the hookVersion skew
The
out_dir
in the JSON is still emitted for the time being, until everyone has migrated.Fixes in this PR
The
native_toolchain_c
tests were not looking at what theinput.outputDirectory
was but assumed that the temp dir was that directory. These tests have been fixed.The
NativeAssetsBuildRunner
was passingHookInput
around instead of thebuildDir
and tried to reverse engineer thebuildDir
by doinginput.outputDirector.resolve('../')
. This has now been cleaned up.