- Use the public
buildSdkSummary
api from the analyzer instead of the private one.
- Migrate to new analyzer API for creating an SDK summary after the old approach was broken.
- Fix
isLibrary
for unreadable assets to returnfalse
. - Fix
libraryFor
to do an explicitcanRead
check and throw anAssetNotFound
exception if it cannot be read.
- Enables the
non-nullable
experiment when summarizing the SDK, see dart-lang/sdk#41820. - Reverts the
enableExperiments
option onAnalyzerResolvers
.- To enable experiments you should instead run your code in an experiment
Zone using the
withEnabledExperiments
function frompackage:build/experiments.dart
.
- To enable experiments you should instead run your code in an experiment
Zone using the
- Pass an explicit
FeatureSet
to the analyzer based on the current sdk version. Add an extra optionenableExperiments
toAnalyzerResolvers
.- This was reverted in
1.3.8
and replaced with a different mechanism.
- This was reverted in
- Added a warning if the current analyzers language version does not support the current SDK language version.
- Fix bug when a package has no language version (as a result of having no sdk constraint).
- Create and pass a correct
Packages
argument to analysis driver, this enables getting the proper language version for a givenLibraryElement
using thelanguageVersionMajor
andlanguageVersionMinor
getters.
- Remove dependency on
package_resolver
. - Add new required
featureSet
argument toSummaryBuilder.build
call.
- Fix an issue where non-existing Dart assets weren't visible to the analyzer, even when they are created later.
- Improve detection of the flutter SDK for older flutter versions.
- Add an exception on trying to resolve an
AssetId
that is not a Dart library withlibraryFor
to fit the contract expressed by the doc comment onResolver
.
You can now resolve additional libraries other than those imported by the primary entrypoint.
- This is supported through the
isLibrary
andlibraryFor
methods onResolver
, which will now resolve the provided asset if it is not already resolved. - Note: Doing this may affect the result of subsequent calls to
resolver.libraries
andresolver.findLibraryByName
if new libraries are discovered.
Note: If using build_runner
then this will also require you to upgrade
to version 4.2.0
of build_runner_core
.
- Changed a
hide
declaration to ashow
declaration to support apackage:analyzer
change.
- Update to
package:analyzer
version0.39.0
.
Check the build_resolvers version as a part of sdk summary invalidation.
Add flutters embedded sdk to the summary if available. This has the effect of
making dart:ui
and any future libraries available if using the flutter sdk
instead of the dart sdk.
Check the analyzer path before reading cached summaries in addition to the SDK version.
Update the AnalysisResolvers
class to no longer use the SDK summary that is
shipped with the SDK by default. This is not guaranteed compatible with
analyzer versions shipped on pub and should not be used by any non-sdk code.
In order to fix this the AnalysisResolvers
class now takes an optional method
that returns the path to an arbitrary SDK summary. By default it will lazily
generate a summary under .dart_tool/build_resolvers
which is invalidated
based on the Platform.version
from dart:io
.
- Allow
build
version 1.2.x.
- Allow analyzer version 0.38.0.
- Allow analyzer version 0.37.0.
- Fix a race condition where some assets may be resolved with missing
dependencies. This was likely to have only manifested in tests using
resolveSource
.
- Increase lower bound sdk constraint to 2.1.0.
- Increased the upper bound for
package:analyzer
to<0.37.0
.
- Fixes a bug where transitive
dart-ext:
imports would cause the resolver to fail. These uris will now be ignored.
- Ensure that
BuildAssetUriResolver.restoreAbsolute
never returns null.- Fixes a crash when a resolver is requested but not all transitive sources are available yet.
- Fix a bug causing crashes on windows.
- Migrate to
AnalysisDriver
. There are behavior changes which may be breaking. TheLibraryElement
instances returned by the resolver will now:- Have non-working
context
fields. - Have no source offsets for annotations or their errors.
- Have working
session
fields. - Have
Source
instances with different URIs than before. - Not include missing libraries in the
importedLibraries
getter. You can instead use theimports
getter to see all the imports.
- Have non-working
- Update to
build
1.1.0
and addassetIdForElement
.
- Updated _AssetUriResolver to prepare for a future release of the analyzer.
- Increased the upper bound for
package:analyzer
to<0.35.0
.
- Increased the upper bound for
package:analyzer
to<0.34.0
.
- Increased the upper bound for the
build
to<1.1.0
.
- Removed dependency on cli_util.
- Increased the upper bound for the
build
to<0.12.9
.
- Don't log a severe message when a URI cannot be resolved. Just return
null
.
- Use sdk summaries for the analysis context, which makes getting the initial resolver faster (reapplied).
- Restore
new
keyword for a working release on Dart 1 VM.
- Use sdk summaries for the analysis context, which makes getting the initial resolver faster.
- Release broken on Dart 1 VM.
- Increased the upper bound for the sdk to
<3.0.0
.
- Allow passing in custom
AnalysisOptions
.
- Support
package:analyzer
0.32.0
.
- Switch to
firstWhere(orElse)
for compatibility with the SDK dev.45
- Removed locking between uses of the Resolver and added a mandatory
reset
call to indicate that a complete build is finished.
- Support the latest
analyzer
package.
- Initial release as a migration from
code_transformers
with a near-identical implementation.