Skip to content

Commit

Permalink
Version 3.8.0-56.0.dev
Browse files Browse the repository at this point in the history
Merge f797e5f into dev
  • Loading branch information
Dart CI committed Jan 30, 2025
2 parents 25f17fd + f797e5f commit 3832ca7
Show file tree
Hide file tree
Showing 34 changed files with 625 additions and 233 deletions.
77 changes: 77 additions & 0 deletions docs/gsoc/Dart-GSoC-2025-Project-Ideas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
> [!warning]
> **Google Summer of Code 2025 is not accepting applications yet**.
------

A list of Google Summer of Code project ideas for Dart.

For GSoC related discussions please use the [dart-gsoc group](https://groups.google.com/forum/#!forum/dart-gsoc).

**Potential mentors**
* Jonas Jensen ([jonasfj](https://github.com/jonasfj)) `[email protected]`
* Daco Harkes ([dcharkes](https://github.com/dcharkes)) `[email protected]`
* Hossein Yousefi ([HosseinYousefi](https://github.com/HosseinYousefi)) `[email protected]`
* Liam Appelbe ([liamappelbe](https://github.com/liamappelbe)) `[email protected]`
* More to come!

## Project Application Process
All projects assume familiarity with Dart (and sometimes Flutter). Aspiring applicants are encouraged to [learn Dart](https://dart.dev/guides/language/language-tour) and try to write some code.

Applicants are welcome to find and fix bugs in [Dart](https://github.com/dart-lang/sdk) or some of the [packages written by the Dart team](https://pub.dev/publishers/dart.dev/packages). However, getting reviews can take a long time as code owners may be busy working on new features. So instead of requiring applicants to fix a _good first bug_, we
suggest that applicants write a working code sample relevant for the proposed project.

The code sample can be attached to the application as a [**secret** gist](https://gist.github.com/) (please use _secret gists_, and do not share these with other applicants). Suggested ideas below includes proposed "Good Sample Projects".

**Do not spend too much energy on this piece of sample code**, we just want to see
that you can code something relevant -- and that this sample code can run and do something non-trivial. Be aware that we have a limited number of
mentors available, and will only be able to accept a few applicants.

Applications can be submitted through the [summerofcode.withgoogle.com](https://summerofcode.withgoogle.com/) website. Applicants are encouraged to submit draft proposals, linking to Google Docs with permission for mentors to comment. See also the [contributor guide](https://google.github.io/gsocguides/student/writing-a-proposal) on writing a proposal.

**IMPORTANT**: Remember to submit _final proposals_ before [the April 2nd deadline](https://developers.google.com/open-source/gsoc/timeline).

## **Idea:** Exception testing for `package:webcrypto`

- **Possible Mentor(s)**: `[email protected]`,
- **Difficulty**: Hard
- **Project size**: Large (350 hours)
- **Skills**: Dart, FFI, JS

**Description**: `package:webcrypto` ([github.com/google/webcrypto.dart](https://github.com/google/webcrypto.dart)) is a cross-platform implementation of the [Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/).
It is important that it behaves the same way whether it's running on Windows, Linux, Mac, Android, iOS, Chrome, Firefox, or Safari. Towards that end, it has a lot of test cases. We could and should probably make more test cases.
But we should also test that it throws the types of exceptions when given incorrect parameters. This probably needs a small test framework to ensure good test coverage.

We expect a proposal for this project to include:
* A sample showing how to test exceptions for `RsaPssPrivateKey.generateKey`.
Ideally, the sample project includes parts of a generalized framework for testing exceptions.
* An outline of what kind of exceptions should be tested?
* A design for extending `TestRunner`, or creating a new framework, to test exceptions thrown by all methods.
* Illustrative code for how test cases would be configured
* Pros and cons of the design (especially when multiple choices are available)
* Timeline for the project

**Good Sample Project**:
Write a test cases that tests the different kinds of errors and exceptions that can be thrown by `RsaPssPrivateKey.generateKey`, run the tests across desktop, Chrome and Firefox. Consider extending the tests to cover all members of `RsaPssPrivateKey`.
Try to generalize these test cases to avoid repetitive code, see the existing [TestRunner](https://github.com/google/webcrypto.dart/blob/5e6d20f820531d2b7b05935c1d78f38a036035e8/lib/src/testing/utils/testrunner.dart#L227) for inspiration.


**Expected outcome**: PRs that land in `package:webcrypto` and increases our confidence in correctness cross-platforms.

## TODO: More ideas as they come!

# Template:

Copy this template.

## **Idea:** ...

- **Possible Mentor(s)**:
- **Difficulty**: Easy / Hard
- **Project size**: Small (90) / Medium (175 hours) / Large (350 hours)
- **Skills**: ...

**Description**: ...

**Good Sample Project**: ...

**Expected outcome**: ...
1 change: 0 additions & 1 deletion pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ enum NullValues implements NullValue<Object> {
Initializers,
Labels,
Metadata,
MixinApplicationBuilder,
Modifiers,
Name,
NominalVariable,
Expand Down
4 changes: 0 additions & 4 deletions pkg/compiler/test/model/cfe_constant_evaluation_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,6 @@ class B extends A {
final b;
const D(c) : b = c + 2, super(c + 1);
}
class E {
const E() : assert(true_!);
}
''',
[
ConstantData(r'const A()', 'ConstructedConstant(A())'),
Expand All @@ -615,7 +612,6 @@ class B extends A {
r'const D(0)',
'ConstructedConstant(D(a=IntConstant(1),b=IntConstant(2)))',
),
ConstantData(r'const E()', 'ConstructedConstant(E())'),
],
),
TestData(
Expand Down
16 changes: 0 additions & 16 deletions pkg/front_end/lib/src/builder/mixin_application_builder.dart

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/front_end/lib/src/fragment/class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ClassFragment extends DeclarationFragment implements Fragment {
late final List<MetadataBuilder>? metadata;
late final Modifiers modifiers;
late final TypeBuilder? supertype;
late final MixinApplicationBuilder? mixins;
late final List<TypeBuilder>? mixins;
late final List<TypeBuilder>? interfaces;
late final List<ConstructorReferenceBuilder> constructorReferences;
late final int startOffset;
Expand Down
2 changes: 1 addition & 1 deletion pkg/front_end/lib/src/fragment/enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EnumFragment extends DeclarationFragment implements Fragment {

late final LookupScope compilationUnitScope;
late final List<MetadataBuilder>? metadata;
late final MixinApplicationBuilder? supertypeBuilder;
late final List<TypeBuilder>? mixins;
late final List<TypeBuilder>? interfaces;
late final List<ConstructorReferenceBuilder> constructorReferences;
late final int startOffset;
Expand Down
1 change: 0 additions & 1 deletion pkg/front_end/lib/src/fragment/fragment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import '../builder/declaration_builders.dart';
import '../builder/formal_parameter_builder.dart';
import '../builder/member_builder.dart';
import '../builder/metadata_builder.dart';
import '../builder/mixin_application_builder.dart';
import '../builder/named_type_builder.dart';
import '../builder/omitted_type_builder.dart';
import '../builder/type_builder.dart';
Expand Down
2 changes: 1 addition & 1 deletion pkg/front_end/lib/src/fragment/mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MixinFragment extends DeclarationFragment implements Fragment {
late final List<MetadataBuilder>? metadata;
late final Modifiers modifiers;
late final TypeBuilder? supertype;
late final MixinApplicationBuilder? mixins;
late final List<TypeBuilder>? mixins;
late final List<TypeBuilder>? interfaces;
late final List<ConstructorReferenceBuilder> constructorReferences;
late final int startOffset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class NamedMixinApplicationFragment implements Fragment {
final List<MetadataBuilder>? metadata;
final List<NominalParameterBuilder>? typeParameters;
final TypeBuilder? supertype;
final MixinApplicationBuilder mixins;
final List<TypeBuilder> mixins;
final List<TypeBuilder>? interfaces;
final LookupScope compilationUnitScope;

Expand Down
20 changes: 12 additions & 8 deletions pkg/front_end/lib/src/kernel/constant_evaluator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4716,16 +4716,20 @@ class ConstantEvaluator implements ExpressionVisitor<Constant> {

@override
Constant visitNullCheck(NullCheck node) {
final Constant constant = _evaluateSubexpression(node.operand);
if (constant is AbortConstant) return constant;
if (constant is NullConstant) {
return createEvaluationErrorConstant(node, messageConstEvalNonNull);
}
if (shouldBeUnevaluated) {
if (enableConstFunctions) {
// Coverage-ignore-block(suite): Not run.
return unevaluated(node, new NullCheck(_wrap(constant)));
final Constant constant = _evaluateSubexpression(node.operand);
if (constant is AbortConstant) return constant;
if (constant is NullConstant) {
return createEvaluationErrorConstant(node, messageConstEvalNonNull);
}
if (shouldBeUnevaluated) {
return unevaluated(node, new NullCheck(_wrap(constant)));
}
return constant;
} else {
return _notAConstantExpression(node);
}
return constant;
}

@override
Expand Down
1 change: 0 additions & 1 deletion pkg/front_end/lib/src/kernel/expression_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ abstract class Generator {
} else {
if (_helper.constantContext != ConstantContext.none &&
selector.name != lengthName) {
// Coverage-ignore-block(suite): Not run.
_helper.addProblem(
messageNotAConstantExpression, fileOffset, token.length);
}
Expand Down
12 changes: 4 additions & 8 deletions pkg/front_end/lib/src/source/builder_factory.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import '../builder/constructor_reference_builder.dart';
import '../builder/declaration_builders.dart';
import '../builder/formal_parameter_builder.dart';
import '../builder/metadata_builder.dart';
import '../builder/mixin_application_builder.dart';
import '../builder/named_type_builder.dart';
import '../builder/nullability_builder.dart';
import '../builder/omitted_type_builder.dart';
Expand Down Expand Up @@ -218,7 +217,7 @@ abstract class BuilderFactory {
required Identifier identifier,
required List<NominalParameterBuilder>? typeParameters,
required TypeBuilder? supertype,
required MixinApplicationBuilder? mixins,
required List<TypeBuilder>? mixins,
required List<TypeBuilder>? interfaces,
required int startOffset,
required int nameOffset,
Expand All @@ -230,8 +229,8 @@ abstract class BuilderFactory {
required List<MetadataBuilder>? metadata,
required Identifier identifier,
required List<NominalParameterBuilder>? typeParameters,
required MixinApplicationBuilder? supertypeBuilder,
required List<TypeBuilder>? interfaceBuilders,
required List<TypeBuilder>? mixins,
required List<TypeBuilder>? interfaces,
required int startOffset,
required int endOffset});

Expand Down Expand Up @@ -282,15 +281,12 @@ abstract class BuilderFactory {
required List<NominalParameterBuilder>? typeParameters,
required Modifiers modifiers,
required TypeBuilder? supertype,
required MixinApplicationBuilder mixinApplication,
required List<TypeBuilder> mixins,
required List<TypeBuilder>? interfaces,
required int startOffset,
required int nameOffset,
required int endOffset});

MixinApplicationBuilder addMixinApplication(
List<TypeBuilder> mixins, int charOffset);

void addFunctionTypeAlias(
List<MetadataBuilder>? metadata,
String name,
Expand Down
Loading

0 comments on commit 3832ca7

Please sign in to comment.