-
Notifications
You must be signed in to change notification settings - Fork 67
[native_assets_cli] Deprecate output_directory
#2130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
bc6884f
to
dea58ed
Compare
@@ -56,6 +56,7 @@ void main() async { | |||
File.fromUri( | |||
buildInputUri, | |||
).writeAsStringSync(jsonEncode(inputBuilder.json)); | |||
outputDirectory = BuildInput(inputBuilder.json).outputDirectory; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this conceptually - why do we need to pass the outputDirectory
to then retrieve the outputDirectory
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BuildInput.outputDirectory
now comes up with it's own directory instead of taking the one from the constructor.
I think we should deprecate the parameter in the constructor so that it's clear that that's no longer used.
0ae413d
to
4730075
Compare
dea58ed
to
d5e3137
Compare
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.