Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ class AppleIDPUtils {
nonce: null,
);

// TODO: Handle the edge-case where we already know the user, but they
// disconnected and now "registered" again, in which case we need to
// receive and store the new refresh token.
// TODO(https://github.com/serverpod/serverpod/issues/4105):
// Handle the edge-case where we already know the user, but they
// disconnected and now "registered" again, in which case we need to
// receive and store the new refresh token.

var appleAccount = await AppleAccount.db.findFirstRow(
session,
Expand Down Expand Up @@ -177,7 +178,8 @@ class AppleIDPUtils {
return;
}

/// TODO: Implement session revocation based on the notification for all
/// TODO(https://github.com/serverpod/serverpod/issues/4105):
/// Implement session revocation based on the notification for all
/// the sessions associated with the Apple account.
return;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import 'google/sign_in_with_google.dart';
/// https://example.com/googlesignin
Future<UserInfo?> signInWithGoogle(
Caller caller, {
bool debug = false, //TODO: Remove this parameter on next breaking change.
String? clientId,
String? serverClientId,
List<String> additionalScopes = const [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class SignInWithGoogleButton extends StatefulWidget {
/// The style of the button.
final ButtonStyle? style;

/// Will output debug prints if set to true.
final bool debug;

/// Scopes to request when signing in. Default scopes are userinfo.profile
/// and email, these should not be included in the [additionalScopes] list.
final List<String> additionalScopes;
Expand All @@ -51,7 +48,6 @@ class SignInWithGoogleButton extends StatefulWidget {
this.serverClientId,
this.onSignedIn,
this.onFailure,
this.debug = false,
this.style,
this.additionalScopes = const [],
this.alignment = Alignment.centerLeft,
Expand Down Expand Up @@ -85,7 +81,6 @@ class SignInWithGoogleButtonState extends State<SignInWithGoogleButton> {
// Attempt to sign in the user.
signInWithGoogle(
widget.caller,
debug: widget.debug,
clientId: widget.clientId,
serverClientId: widget.serverClientId,
additionalScopes: widget.additionalScopes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class GoogleEndpoint extends Endpoint {

if (person.names == null) return AuthenticationResponse(success: false);

var fullName = person.names?[0].displayName; // TODO: Double check
var fullName = person.names?[0].displayName;
var name = person.names?[0].givenName;
var image = person.photos?[0].url;
var email = person.emailAddresses?[0].value;
Expand Down Expand Up @@ -136,7 +136,7 @@ class GoogleEndpoint extends Endpoint {
String clientId = clientSecret.clientId;

// Verify the token with Google's servers.
// TODO: This should probably be done on this server.
// This should probably be done on this server.
var response = await http.get(Uri.parse(
'https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=$idToken'));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ class ChatInputState extends State<ChatInput> {
onDelete: () {
setState(() {
_attachments.remove(attachment);
// TODO: Remove from server
// Does not remove the actual attached file from server.
// Only disassociates it with the chat message.
});
},
),
Expand Down
2 changes: 0 additions & 2 deletions packages/serverpod/lib/src/cache/redis_cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@ class RedisCache extends GlobalCache {
}

@override
// TODO: implement localKeys
List<String> get localKeys =>
throw UnimplementedError('No local keys are used in RedisCache');

@override
// TODO: implement localSize
int get localSize =>
throw UnimplementedError('No local keys are used in RedisCache');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:path/path.dart' as p;

const _endpointName = 'serverpod_cloud_storage';

// TODO: Add more content type mappings.
const _mimeTypeMapping = <String, MimeType>{
'.js': MimeType.javascript,
'.json': MimeType.json,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class ValueEncoder extends PostgresTextEncoder {
} else if (input is String &&
input.startsWith('decode(\'') &&
input.endsWith('\', \'base64\')')) {
// TODO:
// This is a bit of a hack to get ByteData working. Strings that starts
// with `convert('` and ends with `', 'base64') will be incorrectly
// encoded to base64. Best would be to find a better way to detect when we
Expand Down
5 changes: 3 additions & 2 deletions packages/serverpod/lib/src/database/analyze.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ WHERE t.relname = '$tableName' AND n.nspname = '$schemaName';
type: index[7],
isUnique: index[2],
isPrimary: index[3],
//TODO: Maybe unquote in the future. Should be considered when Serverpod introduces partial indexes.
// ISSUE(https://github.com/serverpod/serverpod/issues/716):
// Maybe unquote in the future. Should be considered when Serverpod
// introduces partial indexes.
predicate: index[6],
vectorDistanceFunction: vectorDistanceFunction,
vectorColumnType: vectorColumnType,
Expand Down Expand Up @@ -360,7 +362,6 @@ extension on String {
/// Removes the surrounding quotes if the string
/// starts and ends with ".
String get removeSurroundingQuotes {
//TODO: Handle " that are inside an expression.
if (startsWith('"') && endsWith('"')) {
return substring(1, length - 1);
} else {
Expand Down
2 changes: 0 additions & 2 deletions packages/serverpod/lib/src/database/concepts/columns.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ class ColumnSerializable<T> extends Column<T> {
super.table, {
super.hasDefault,
});

// TODO: Add comparisons and possibly other operations
}

abstract class _ValueOperatorColumn<T> extends Column<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ class FutureCallManager {
final futureCall = _futureCalls[entry.name];

if (futureCall == null) {
// TODO: this should be logged or caught otherwise.
// https://github.com/serverpod/serverpod/issues/3485
// ISSUE(https://github.com/serverpod/serverpod/issues/3485):
// This should be logged or caught otherwise.
return null;
}

Expand Down
5 changes: 3 additions & 2 deletions packages/serverpod/lib/src/server/health_check_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ class HealthCheckManager {
await ServerHealthConnectionInfo.db.insertRow(session, connectionInfo);
}
} catch (e) {
// TODO: Sometimes serverpod attempts to write duplicate health checks for
// the same time. Doesn't cause any harm, but would be nice to fix.
// ISSUE(https://github.com/serverpod/serverpod/issues/4123):
// Sometimes serverpod attempts to write duplicate health checks for the
// same time.
}

await _pod.reloadRuntimeSettings();
Expand Down
2 changes: 0 additions & 2 deletions packages/serverpod/lib/src/server/message_central.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ abstract class MessageCentralServerpodChannels {
'_serverpod_revoked_authentication_$userIdentifier';
}

// TODO: Support for server clusters.

/// The callback used by listeners of the [MessageCentral].
typedef MessageCentralListenerCallback = void Function(
SerializableModel message);
Expand Down
8 changes: 4 additions & 4 deletions packages/serverpod/lib/src/server/serverpod.dart
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,10 @@ class Serverpod {
databaseConfiguration,
);

// TODO: Remove this when we have a better way to handle this.
// Tracked by issue: https://github.com/serverpod/serverpod/issues/2421
// This is required because other operations in Serverpod assumes that the
// database is connected when the Serverpod is created
// ISSUE(https://github.com/serverpod/serverpod/issues/2421):
// Remove this when we have a better way to handle this.
// This is required because other operations in Serverpod assumes that
// the database is connected when the Serverpod is created
// (such as createSession(...)).
_databasePoolManager?.start();
}
Expand Down
1 change: 0 additions & 1 deletion packages/serverpod_client/lib/src/file_uploader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class FileUploader {
return response.statusCode == 204;
}
} catch (e) {
// TODO: Shouldn't we log something here?
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ abstract class ServerpodClientShared extends EndpointCaller {
/// The [SerializationManager] used to serialize objects sent to the server.
final SerializationManager serializationManager;

// TODO: Deprecate after the new authentication system is in place.
// TODO(https://github.com/serverpod/serverpod/issues/4105):
// Deprecate after the new authentication system is in place.
/// Optional [AuthenticationKeyManager] if the client needs to sign the user in.
final AuthenticationKeyManager? authenticationKeyManager;

Expand Down Expand Up @@ -240,7 +241,8 @@ abstract class ServerpodClientShared extends EndpointCaller {
_disconnectWebSocketStreamOnLostInternetConnection =
disconnectStreamsOnLostInternetConnection;

// TODO: Remove this backwards compatibility assignment.
// TODO(https://github.com/serverpod/serverpod/issues/4105):
// Remove this backwards compatibility assignment.
authKeyProvider ??= authenticationKeyManager;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/serverpod_serialization/lib/src/serialization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ abstract class SerializationManager {
T deserialize<T>(dynamic data, [Type? t]) {
t ??= T;

//TODO: all the "dart native" types should be listed here
if (_isNullableType<int>(t)) {
return data;
} else if (_isNullableType<double>(t)) {
Expand Down Expand Up @@ -214,7 +213,6 @@ abstract class SerializationManager {
return JsonEncoder.withIndent(
formatted ? ' ' : null,
(nonEncodable) {
//TODO: Remove this in 2.0.0 as the extensions should be used instead.
if (nonEncodable is DateTime) {
return nonEncodable.toUtc().toIso8601String();
} else if (nonEncodable is ByteData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ library;

export 'src/protocol/protocol.dart';
export 'src/service_key_manager.dart';

// TODO: Export any libraries intended for clients of this package.
5 changes: 0 additions & 5 deletions tests/serverpod_test_server/test_e2e/connection_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,6 @@ void main() {
expect(numRows, isNotNull);
expect(numRows, equals(101));
});

test('Exception after delay', () async {
await client.asyncTasks.throwExceptionAfterDelay(1);
// TODO: Check that it is recorded in error logs.
});
});

group('Failed calls', () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// TODO: Put public facing types in this file.

class ExternalCustomClass {
final String value;

Expand Down
3 changes: 0 additions & 3 deletions tools/serverpod_cli/lib/src/database/migration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ DatabaseMigration generateDatabaseMigration({
),
);
} else if (!diff.isEmpty) {
// Table was modified
// TODO: Check if table can be modified

actions.add(
DatabaseMigrationAction(
type: DatabaseMigrationActionType.alterTable,
Expand Down
1 change: 0 additions & 1 deletion tools/serverpod_cli/lib/src/generator/types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ class TypeDefinition {

/// Get the pgsql type that represents this [TypeDefinition] in the database.
String get databaseType {
// TODO: add all supported types here
var enumSerialization = enumDefinition?.serialized;
if (enumSerialization != null && isEnumType) {
switch (enumSerialization) {
Expand Down
5 changes: 3 additions & 2 deletions tools/serverpod_cli/lib/src/util/model_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ class ModelHelper {
modelSources.addAll(modelSource);
}

// TODO This sort is needed to make sure all generated methods
// are in the same order. Move this logic to the code generator instead.
// This sort is needed to make sure all analyzed models are processed in
// the same order. This affects the order of partial imports in sealed
// classes.
modelSources
.sort((a, b) => a.yamlSourceUri.path.compareTo(b.yamlSourceUri.path));

Expand Down
31 changes: 0 additions & 31 deletions tools/serverpod_cli/lib/src/util/process_killer_extension.dart

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Future createTestEnvironment(
var pubspecFile = File(path.join(testProjectDirectory.path, 'pubspec.yaml'));
pubspecFile.createSync(recursive: true);

/// TODO: the serverpod import is brittle here, this should be refactored if
/// these tests stay around.
/// But the goal is to remove the structure of these tests once we have
/// refactored the analyzer.
pubspecFile.writeAsStringSync('''
name: test_server
description: Starting point for a Serverpod server.
Expand Down