Skip to content

Commit

Permalink
Remove most of the dartdoc service entry point and handlers. (dart-la…
Browse files Browse the repository at this point in the history
…ng#7648)

* Remove most of the dartdoc service entry point and handlers.

* Remove dartdoc-port from pub_integration
  • Loading branch information
isoos authored Apr 17, 2024
1 parent 66fc99e commit 46d1ebd
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 117 deletions.
36 changes: 0 additions & 36 deletions app/lib/dartdoc/handlers.dart

This file was deleted.

63 changes: 0 additions & 63 deletions app/lib/fake/server/fake_dartdoc_service.dart

This file was deleted.

14 changes: 0 additions & 14 deletions app/lib/fake/server/fake_server_entrypoint.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:args/command_runner.dart';
import 'package:http/http.dart';
import 'package:pub_dev/fake/backend/fake_pub_worker.dart';
import 'package:pub_dev/fake/server/fake_analyzer_service.dart';
import 'package:pub_dev/fake/server/fake_dartdoc_service.dart';
import 'package:pub_dev/fake/server/fake_default_service.dart';
import 'package:pub_dev/fake/server/fake_search_service.dart';
import 'package:pub_dev/fake/server/fake_storage_server.dart';
Expand Down Expand Up @@ -43,9 +42,6 @@ class FakeServerCommand extends Command {
..addOption('analyzer-port',
defaultsTo: '8083',
help: 'The HTTP port for the fake analyzer service.')
..addOption('dartdoc-port',
defaultsTo: '8084',
help: 'The HTTP port for the fake dartdoc service.')
..addOption('data-file',
help: 'The file to read and also to store the local state.')
..addFlag('watch',
Expand All @@ -60,7 +56,6 @@ class FakeServerCommand extends Command {
final storagePort = int.parse(argResults!['storage-port'] as String);
final searchPort = int.parse(argResults!['search-port'] as String);
final analyzerPort = int.parse(argResults!['analyzer-port'] as String);
final dartdocPort = int.parse(argResults!['dartdoc-port'] as String);
final readOnly = argResults!['read-only'] == true;
final dataFile = argResults!['data-file'] as String?;
final watch = argResults!['watch'] == true;
Expand Down Expand Up @@ -91,7 +86,6 @@ class FakeServerCommand extends Command {
storage,
cloudCompute,
);
final dartdocService = FakeDartdocService(datastore, storage, cloudCompute);

final configuration = Configuration.fakePubServer(
frontendPort: port,
Expand Down Expand Up @@ -121,16 +115,12 @@ class FakeServerCommand extends Command {
if (rq.requestedUri.path == '/fake-update-all') {
return await _chainHandlers([
() => _updateUpstream(analyzerPort),
() => _updateUpstream(dartdocPort),
() => _updateUpstream(searchPort),
]);
}
if (rq.requestedUri.path == '/fake-update-analyzer') {
return await _updateUpstream(analyzerPort);
}
if (rq.requestedUri.path == '/fake-update-dartdoc') {
return await _updateUpstream(dartdocPort);
}
if (rq.requestedUri.path == '/fake-update-search') {
return await _updateUpstream(searchPort);
}
Expand All @@ -153,10 +143,6 @@ class FakeServerCommand extends Command {
port: analyzerPort,
configuration: configuration,
),
dartdocService.run(
port: dartdocPort,
configuration: configuration,
),
],
eagerError: true,
);
Expand Down
4 changes: 2 additions & 2 deletions app/lib/service/entrypoint/dartdoc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import 'dart:async';
import 'package:args/command_runner.dart';
import 'package:logging/logging.dart';

import '../../dartdoc/handlers.dart';
import '../../service/services.dart';
import '../../shared/env_config.dart';
import '../../shared/handler_helpers.dart';
import '../../shared/handlers.dart';

final Logger logger = Logger('pub.dartdoc');

Expand All @@ -25,7 +25,7 @@ class DartdocCommand extends Command {
Future<void> run() async {
envConfig.checkServiceEnvironment(name);
await withServices(() async {
await runHandler(logger, dartdocServiceHandler);
await runHandler(logger, notFoundHandler);
});
}
}
2 changes: 0 additions & 2 deletions pkg/pub_integration/lib/src/fake_pub_server_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class FakePubServerProcess {
final storagePort = port + 1;
final searchPort = port + 2;
final analyzerPort = port + 3;
final dartdocPort = port + 4;
final vmPort = port + 5;
final coverageConfig = await _CoverageConfig.detect(vmPort);

Expand All @@ -65,7 +64,6 @@ class FakePubServerProcess {
'--storage-port=$storagePort',
'--search-port=$searchPort',
'--analyzer-port=$analyzerPort',
'--dartdoc-port=$dartdocPort',
],
workingDirectory: appDir,
environment: {
Expand Down

0 comments on commit 46d1ebd

Please sign in to comment.