runfiles 0.10.0
runfiles: ^0.10.0 copied to clipboard
Bazel runfiles library for Dart. Locates data files at runtime.
Changelog #
0.10.0 #
Breaking #
@rules_dart//dart/unused_deps --dry-runprints a diff, no longerbuildozercommands@rules_dart//dart/unused_depssays what Bazel's exit code means when its build fails@rules_dart//dart/unused_depssays how to rewrite or opt out a dep it cannot remove- Default Dart SDK is 3.14.1
- Dart SDK 3.13 releases are no longer served
dart_kernel_sourceanddart_analyzer_sourcebuild any Dart release given itssha256dart_testanddart_binaryfail on asrcsentry of whichmainloads nothing- Files of a shared
filegroupthat a program never loads need nodepsand use none - Gazelle gives a test only the
depsof the helpers it reaches import_check_output_groupsrequiresmainbazel run @rules_dart//dart/unused_depsnames srcsmainnever loads and keeps what only they usebazel run @rules_dart//dart/unused_depskeeps every dep of a target whose imports are refuseddart_analyzeaccepts a@docImportof what the target does not depend on- Bazel's repository cache keeps one copy of each pub package version
pub_lock_packageno longer fetches: it needsfilesfrompub_archive_filesorpub_git_fileslink_pub_filesandwrite_pub_files_rootbuild a source repository over a files repositoryPUBSPEC_DEPENDENCIESnames the filewrite_pubspec_dependencieswrites- Builds fail, naming both targets, when two different packages share a
package_name - Two fetchers' copies of a pub package are one only when fetched alike or built from one directory
make_dart_library_build_contenttakessourcein place ofpurlpub.from_lock()resolvespathpackages against a lock named in a subdirectorypub_hosted_source,pub_git_sourceandpub_path_sourcesay where a package came frompub_package_identitytakes a package'ssourcein place of its purlmake_package_metadata_contentwrites a generated package's declaration from itssourceDartPackageMetadataInfo(...)takes only the facts it states, the rest empty- Removed
pub_lock_git_package;pub_lock_packagebuilds git packages too - A
dart_librarywith onlydepsis no longer a package of its own dart_info_no_packagetakesrunfilesdata_runfilesin@rules_dart//dart:utils.bzlgives the runfiles ofdatatargetspub_files_fetchedsays what a files repository fetchedpub.from_lock()andpub.package()serve pub.dev'srunfilesfrom@rules_dart//dart/runfiles@rules_dart//dart/runfilesstates its license filepublished_by_rules_dartinpub_lock_package.bzlnames the pub packages rules_dart serves itselfrules_dartneeds Bazel 9.3.0 or newerderive_package_roottakesrepo_rootin place ofworkspace_root- Editing rules_dart or adding a worktree no longer stores a Dart SDK release again
dart_repositoriesis a function to call, no longer a repository rule- Removed
dart_sdk_repo_impl; usedart_sdk_repo_attrs dart.release,dart.custom_sdkanddart.checkoutdeclare Dart SDKs rules_dart does not pindart.custom_sdkanddart.checkoutcross-compile with the toolscross_toolsnamesdart.use_sdkchooses the Dart SDK a build uses, inMODULE.bazel--@rules_dart//dart:sdkoverridesdart.use_sdkfor one build@dart_toolchainsholds every declared SDK;@<name>_toolchainsis removed- Removed
dart_register_toolchains; use thedartextension's tags - A Dart SDK that cannot serve the build fails only the builds using it
- Dart SDKs older than 3.13.0 are refused, naming the minimum
bazel fetch --allandbazel vendorsucceed with Dart SDKs this machine cannot use- A cross
aot-snapshotneeds nodartaotruntimeon local SDKs and Dart 3.15.0-81.0.dev or newer dart.toolchainnames must be a letter followed by letters, digits and underscores- A pub package that cannot be built fails only the builds using it
allow_upgrade_by_dependenciesapplies to adart.toolchainof any nameDartSdkInfo.cross_toolshasgen_snapshotanddartaotruntimein place offilesDartSdkInfo.cross_tools.homeis None for an SDK that finds its tools beside itdart_toolchaintakesbuild_root_toolsandmissing_cross_toolsdart_cross_toolsis a function to call, no longer a repository rule- Removed
dart_cross_tools_impl; usedart_cross_tools_attrs - The pubspec reader compiles with the SDK
dart.use_sdknames, not always thedartrelease read_pubspecreturnsstruct(error, pubspec)instead of failing on a refused pubspec- A pub package whose pubspec pub refuses fails only the builds using it
dart_kernel_sourceanddart_analyzer_sourceare functions to call, no longer repository rules- Adding a Dart release no longer stores other releases' kernel and analyzer sources again
- An SDK source rules_dart's pub packages don't suit fails only builds running that tool, saying why
read_pubspectakeslocked_versionsand returns each excluded dependency inunsatisfiedread_pubspec_dependenciestakes aLabelin the source repository, not its name- A
pathpub package that cannot be built fails only the builds using it build_from_pubspecrefuses a directory with nopubspec.yamlfetch_pub_pathis nowlink_pub_path, which returns why it cannot serve a directorypub.package(name = "runfiles")is an error; depend on@rules_dart//dart/runfilesparse_pubspec_lockreturnsstruct(packages, sdks)instead of the packages dictpub.from_lock()fails on ansdks:block pub would refusepub.from_lock()reads a lock with an emptypackages:as pub doesdart.releaseanddart.toolchainrefuse adart_versionno Dart SDK can havedart.releasefetches main-channel builds named3.15.0-edge.<commit>
Added #
DartCodeAssetInfo.link_inputsholds the objects and archives a code asset was linked fromDartLinkInputsInfolets a rule state what a library it produces was linked from- Builds run on Windows on Arm, as the
windows-arm64SDK host DartCodeAssetInfo.dsymgives the dSYM written with a code asset's libraryDartDsymInfostates the dSYM of a library a rule copies or renamesDartCodeAssetInfo.link_inputs_gonemarks a library whose object files were deletedDartLinkInputsInfotakesgone = Truein place ofinputsversion_constraint_allowsinpub_versions.bzlanswers as pub_semver'sallowsdoesversion_constraint_errorandis_semverinpub_versions.bzlsay what pub would refusepub.from_lockrefuses a lock whose version numbers pub cannot read as integersread_pubspecreturnsflutter_constraintandflutter_minimumread_pubspecrefuses anenvironmentconstraint pub cannot parse, on any SDKpub_lock_package.bzlexports the checkspub.from_lockapplies to lockspub_lock_path_directoryfinds apathpackage's directory from its lockpub.from_locksuggests the Bazel package at an unmappedpathpackage's directorypub.from_lock(build_from_pubspec = ...)buildspathpackages outside the repositoryresolvefinds a cycle through apathpackage outside the repositorybazel vendorleaves outbuild_from_pubspecpackages, which build from their directoryread_pubspec_refusaltells another pub extension why aresolvepackage can't be planneddependency_cycleandcycle_errortakefrom_lock, the caller's tag, for their messages
Fixed #
- A generated source in a package from another repository no longer empties the package
- Builds with
--incompatible_exclude_starlark_flags_from_exec_configno longer hit a cycle - A root
dart.toolchainmay pin any Dart SDK rules_dart supports, not only the newest - A root without a
dart.toolchaingets the newest Dart SDK rules_dart supports dart_testcompiles withdart.vm.productfalse, asdart testdoesDartKernelSdkInfo.module_runtimeis the runtime a test compiles for, whole programs includedDartKernelSdkInfo.runtimeshasdebugfor the VM- The import check accepts a
dart:import whatever its letter case or escapes - Builds no longer make source files read-only and executable on macOS
- A machine with no Dart SDK fails builds needing Dart, saying so;
bazel fetch --allsucceeds - A Linux machine on RISC-V or POWER no longer gets an x64 Dart SDK
dart_code_assetover arust_shared_librarysays why its link inputs are unknown- Execution platforms the chosen Dart SDK lacks are skipped instead of stopping the build
- A Dart SDK may be named
pubspec_reader - The pubspec reader reports why it cannot use the
dart.use_sdkSDK before using thedartrelease dart_code_assetnames thefiletarget when its file is not a dynamic librarypub.from_lock()accepts locks spelling one git package's url orpathdifferently- The package-name clash error says to rename a target named only after its directory
dart/unused_depsleaves the rest of a BUILD file as written, however it is formattedcomment_referencesreports private names despite an unresolved@docImport@rules_dart//dart/unused_depsremoves@repo//:repofrom a file buildifier would change@rules_dart//dart/unused_depsfixes the other BUILD files when it cannot edit onedart_analyzeaccepts references in apart of name;an unresolved doc import may supplydart_analyzeno longer crashes onpart of 'package:...'beside an unresolved doc import- Gazelle puts a part in the
srcsof each test and binary that reaches it - Gazelle writes no
dart_testordart_binaryfor a part, and deletes those it wrote - A
bazel vendordirectory works on another operating system - A repository contents cache shared between hosts no longer breaks reading pubspecs
- A
dart.custom_sdkwhose source reaches a package it also supplies says which one dart.custom_sdkhosts with differentversionfiles each get tools of their own versionpub.from_lockrefuses abuild_from_pubspecpackage another lock lists as hosted or gitpub.from_lock()refuses a package that two locks fetch from different registries- A lock naming
pub.dartlang.orgagrees withpub.package()and locks naming pub.dev - Gazelle keeps a hand-set
mainofdart_binaryanddart_testnamed after another file
What's Changed #
- fix: assemble a package from an external repository with its files by @TrapsterDK in https://github.com/aran/rules_dart/pull/7
New Contributors #
- @TrapsterDK made their first contribution in https://github.com/aran/rules_dart/pull/7
Full Changelog: https://github.com/aran/rules_dart/compare/v0.9.1...v0.10.0