[sdk][bazel] Component name from flutter/dart app

Improvements from:
https://fuchsia-review.googlesource.com/c/scripts/+/185510
when data/<component-name> was explicitly assumed to be package name.
Now, we are able to pass that from the cmx.

Before:
/pkgfs/packages/hello_dart_package/0/meta/deprecated_runtime
/pkgfs/packages/hello_dart_package/0/data/hello_dart_package

After:
/pkgfs/packages/hello_dart_package/0/meta/dart.cmx
/pkgfs/packages/hello_dart_package/0/data/dart

This is a soft transition in which we will temporarily allow:
1. no cmx and data/<package-name>
2. yes cmx and data/<component-name>

Soon, we will remove support for option 1. This means all new
flutter/dart components built by the bazel frontend would require cmx
files.

This also implies removal of meta/deprecated_runtime, because cmx files
are explicitly required. We don't run into the gn complexity equivalent
of trying to toggle runners on build time. The current runners are
always jit.

TESTED=
$ cat my_test_workspace/bazel-out/x86_64-fastbuild/bin/dart/hello_dart_package_pkg/package_manifest
data/dart/main.dilp=bazel-out/x86_64-fastbuild/bin/dart/dart_kernel.dil-main.dilp
data/dart/app.dilplist=bazel-out/x86_64-fastbuild/bin/dart/dart_kernel.dilpmanifest.dilplist
meta/deprecated_runtime=bazel-out/x86_64-fastbuild/bin/dart/runtime
meta/dart.cmx=dart/meta/dart.cmx
data/hello_dart_package/main.dilp=bazel-out/x86_64-fastbuild/bin/dart/dart2_kernel.dil-main.dilp
data/hello_dart_package/app.dilplist=bazel-out/x86_64-fastbuild/bin/dart/dart2_kernel.dilpmanifest.dilplist
meta/deprecated_runtime=bazel-out/x86_64-fastbuild/bin/dart/runtime
meta/package=bazel-out/x86_64-fastbuild/bin/dart/hello_dart_package_pkg/meta/package

CF-170 #comment
CF-129 #comment
CF-80 #comment

Change-Id: Ifc1820327493508531451af48c33da01fe6d6b5b
10 files changed
tree: 70d8215cbaf7682cd9d83671d2fd209bc3979d87
  1. crash/
  2. dart/
  3. devshell/
  4. editors/
  5. gce/
  6. gdb/
  7. manifest/
  8. memory/
  9. packages/
  10. rust/
  11. sdk/
  12. style/
  13. tests/
  14. third_party/
  15. vim/
  16. youcompleteme/
  17. zsh-completion/
  18. .gitignore
  19. AUTHORS
  20. bootstrap
  21. build-qemu.sh
  22. build-zircon.sh
  23. check-gn-format
  24. colorize_logs
  25. CONTRIBUTING.md
  26. fd.py
  27. fetch-build-artifacts
  28. flog
  29. fx
  30. fx-env.sh
  31. fx-wrapper
  32. generate-intellij-config.py
  33. generate-update-source-config.py
  34. git-file-tidy
  35. git-fuchsia-review
  36. git_utils.py
  37. gn_to_cmake.py
  38. LICENSE
  39. list-repo-targets.py
  40. MAINTAINERS
  41. PATENTS
  42. paths.py
  43. pave-prebuilt
  44. publish-package.py
  45. push-package.py
  46. README.md
  47. run-dart-action.py
  48. run-zircon-arm64
  49. run-zircon-x86
  50. start-dhcp-server.sh
  51. update-manifest.go
README.md

Scripts

This repository is for scripts useful when hacking on Fuchsia. This repository should contain scripts that perform tasks spanning multiple repositories. Scripts that only operate within a single repository should live in the relevant repository.

push-package.py

The push-package.py script pushes the files listed in the given manifests files. No checking is performed for incremental changes.

The sample command lines below can be used to build Modular and then push those files to the default device. This assumes you have already booted your device with a version of Fuchsia that contains the most recent version of all other packages. This command line uses the “system_manifest” file from each of the modular directories, such as modular, modular_dev, and modular_tests.

cd $FUCHSIA_DIR
fx build peridot:modular_all
scripts/push-package.py out/debug-x64/package/modular*/system_manifest

fx publish

fx publish will take a package from the build and create a Fuchsia package manager package from a build package. It will then add the package to a local update respository which, by default, is put at ${FUCHSIA_BUILD_DIR}/amber-files. It will also add the package content files to the update repository and name these file after their Merkle Root. If a package name is supplied to fx publish, only that package will be processed. If no name is supplied, all the packages made by the build will be included.