You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Changes to types that only get passed in and are not directly exported lead to detected API changes.
To Reproduce
See this PR: dart-lang/ecosystem#221
The type GithubApi got changed and dart_apitool detected a change.
Actual and Expected behavior
As GithubApi is only used as an argument to the verify method and not exported directly, no consumer code can be harmed.
dart_apitool should not consider GithubApi as part of the public API as it is not exported directly and only used as input for the package. (That doesn't mean that this method has any value for consumers, though)
System info (please complete the following information):
dart --version
Dart SDK version: 3.2.3 (stable) (Tue Dec 5 17:58:33 2023 +0000) on "macos_arm64"
dart-apitool --version
0.17.0
Implementation hint
To not interfer with #171 it would be best to apply the filter in the diffing logic and keep all implicitly used types in the PackageApi model.
Types that are only used as input can be detected by looking at the typeUsages meta information in the model:
If a type only has TypeUsage.input in this list and no entry points then it can be ignored for the diff.
Btw: It looks like there is no use of TypeUsage.provide any more so we can remove it.
The text was updated successfully, but these errors were encountered:
Describe the bug
Changes to types that only get passed in and are not directly exported lead to detected API changes.
To Reproduce
See this PR: dart-lang/ecosystem#221
The type GithubApi got changed and dart_apitool detected a change.
Actual and Expected behavior
As GithubApi is only used as an argument to the
verify
method and not exported directly, no consumer code can be harmed.dart_apitool should not consider GithubApi as part of the public API as it is not exported directly and only used as input for the package. (That doesn't mean that this method has any value for consumers, though)
System info (please complete the following information):
Implementation hint
To not interfer with #171 it would be best to apply the filter in the diffing logic and keep all implicitly used types in the PackageApi model.
Types that are only used as input can be detected by looking at the
typeUsages
meta information in the model:dart_apitool/lib/src/model/interface_declaration.dart
Line 40 in 95277c3
If a type only has
TypeUsage.input
in this list and no entry points then it can be ignored for the diff.Btw: It looks like there is no use of TypeUsage.provide any more so we can remove it.
The text was updated successfully, but these errors were encountered: