-
Notifications
You must be signed in to change notification settings - Fork 75
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
Prepare a hotfix release of DWDS 22.1.0+1 #2321
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0326ba6
Fix `cast` error when debugging from VSCode (#2303)
elliette 01b4237
Add a test for Class inspection (#2310)
elliette 9f8dbde
Disable tests on main
elliette 62f6a88
Fix class_inspection_test
elliette b787e53
Cherrypick 546a0373b982b7d9ae693873fa5c53646df1920f
elliette 2764e09
Update pubspec
elliette 30670c3
Update version
elliette 0dbd8d5
Disable main on webdev
elliette File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
@Tags(['daily']) | ||
@TestOn('vm') | ||
@Timeout(Duration(minutes: 2)) | ||
|
||
import 'package:test/test.dart'; | ||
import 'package:test_common/logging.dart'; | ||
import 'package:test_common/test_sdk_configuration.dart'; | ||
import 'package:vm_service/vm_service.dart'; | ||
|
||
import '../fixtures/context.dart'; | ||
import '../fixtures/project.dart'; | ||
import 'common/test_inspector.dart'; | ||
|
||
void main() { | ||
// Enable verbose logging for debugging. | ||
final debug = false; | ||
|
||
final provider = TestSdkConfigurationProvider( | ||
verbose: debug, | ||
); | ||
|
||
final context = | ||
TestContext(TestProject.testExperimentWithSoundNullSafety, provider); | ||
final testInspector = TestInspector(context); | ||
|
||
late VmService service; | ||
late Stream<Event> stream; | ||
late String isolateId; | ||
late ScriptRef mainScript; | ||
|
||
onBreakPoint(breakPointId, body) => testInspector.onBreakPoint( | ||
stream, | ||
isolateId, | ||
mainScript, | ||
breakPointId, | ||
body, | ||
); | ||
|
||
getObject(instanceId) => service.getObject(isolateId, instanceId); | ||
|
||
group('Class |', () { | ||
tearDownAll(provider.dispose); | ||
|
||
for (var compilationMode in CompilationMode.values) { | ||
group('$compilationMode |', () { | ||
setUpAll(() async { | ||
setCurrentLogWriter(debug: debug); | ||
await context.setUp( | ||
compilationMode: compilationMode, | ||
enableExpressionEvaluation: true, | ||
verboseCompiler: debug, | ||
); | ||
service = context.debugConnection.vmService; | ||
|
||
final vm = await service.getVM(); | ||
isolateId = vm.isolates!.first.id!; | ||
final scripts = await service.getScripts(isolateId); | ||
|
||
await service.streamListen('Debug'); | ||
stream = service.onEvent('Debug'); | ||
|
||
mainScript = scripts.scripts! | ||
.firstWhere((each) => each.uri!.contains('main.dart')); | ||
}); | ||
|
||
tearDownAll(() async { | ||
await context.tearDown(); | ||
}); | ||
|
||
setUp(() => setCurrentLogWriter(debug: debug)); | ||
tearDown(() => service.resume(isolateId)); | ||
|
||
group('calling getObject for an existent class', () { | ||
test('returns the correct class representation', () async { | ||
await onBreakPoint('testClass1Case1', (event) async { | ||
// classes|dart:core|Object_Diagnosticable | ||
final result = await getObject( | ||
'classes|org-dartlang-app:///web/main.dart|GreeterClass', | ||
); | ||
final clazz = result as Class?; | ||
expect(clazz!.name, equals('GreeterClass')); | ||
expect( | ||
clazz.fields!.map((field) => field.name), | ||
unorderedEquals([ | ||
'greeteeName', | ||
'useFrench', | ||
]), | ||
); | ||
expect( | ||
clazz.functions!.map((fn) => fn.name), | ||
containsAll([ | ||
'sayHello', | ||
'greetInEnglish', | ||
'greetInFrench', | ||
]), | ||
); | ||
}); | ||
}); | ||
}); | ||
|
||
group('calling getObject for a non-existent class', () { | ||
// TODO(https://github.com/dart-lang/webdev/issues/2297): Ideally we | ||
// should throw an error in this case for the client to catch instead | ||
// of returning an empty class. | ||
test('returns an empty class representation', () async { | ||
await onBreakPoint('testClass1Case1', (event) async { | ||
final result = await getObject( | ||
'classes|dart:core|Object_Diagnosticable', | ||
); | ||
final clazz = result as Class?; | ||
expect(clazz!.name, equals('Object_Diagnosticable')); | ||
expect(clazz.fields, isEmpty); | ||
expect(clazz.functions, isEmpty); | ||
}); | ||
}); | ||
}); | ||
}); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think semver would have this be a
-
instead of a+
in order to be a pre release version.https://semver.org/
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.
This isn't a pre-release but a hotfix on top of 22.1.0 (which was already released)