mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Add pkg:analysis_tool as an SDK-only set of utils
Reduces the API surface of pkg:analyzer that requires pkg:html Related to https://github.com/dart-lang/sdk/issues/35802 Change-Id: Icd08d76190d6ab77cd180561cdde6df254b22557 Reviewed-on: https://dart-review.googlesource.com/c/91701 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Kevin Moore <kevmoo@google.com>
This commit is contained in:
parent
e5164be27e
commit
ca4978e363
|
@ -8,6 +8,7 @@
|
|||
#
|
||||
analysis_server:pkg/analysis_server/lib
|
||||
analysis_server_client:pkg/analysis_server_client/lib
|
||||
analysis_tool:pkg/analysis_tool/lib
|
||||
analyzer:pkg/analyzer/lib
|
||||
analyzer_cli:pkg/analyzer_cli/lib
|
||||
analyzer_fe_comparison:pkg/analyzer_fe_comparison/lib
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:path/path.dart';
|
||||
|
||||
import 'generate_all.dart';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/**
|
||||
* Code generation for the file "AnalysisServer.java".
|
||||
*/
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
|
||||
import 'api.dart';
|
||||
import 'codegen_java.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:html/dom.dart';
|
||||
|
||||
import 'api.dart';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import 'api.dart';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/**
|
||||
* Tools for Java code generation.
|
||||
*/
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
|
||||
import 'api.dart';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/**
|
||||
* Code generation for the file "AnalysisServer.java".
|
||||
*/
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
|
||||
import 'api.dart';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
|
||||
import 'api.dart';
|
||||
import 'from_html.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
|
||||
import 'api.dart';
|
||||
import 'codegen_dart.dart';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/src/codegen/html.dart';
|
||||
import 'package:analysis_tool/html.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
import 'package:html/parser.dart' as parser;
|
||||
import 'package:path/path.dart';
|
||||
|
@ -131,8 +131,8 @@ class ApiReader {
|
|||
});
|
||||
for (String expectedAttribute in requiredAttributes) {
|
||||
if (!attributesFound.contains(expectedAttribute)) {
|
||||
throw new Exception('$context: ${element
|
||||
.localName} must contain attribute $expectedAttribute');
|
||||
throw new Exception(
|
||||
'$context: ${element.localName} must contain attribute $expectedAttribute');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:path/path.dart';
|
||||
|
||||
import 'codegen_analysis_server.dart' as codegen_analysis_server;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/**
|
||||
* Code for enumerating the set of types implied by the API.
|
||||
*/
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
|
||||
import 'api.dart';
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
*/
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:analyzer/src/codegen/html.dart';
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/html.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
|
||||
import 'api.dart';
|
||||
|
|
3
pkg/analysis_tool/README.md
Normal file
3
pkg/analysis_tool/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
A set of utilities used by the tools in several analyzer-related packages.
|
||||
|
||||
Not meant to be published.
|
|
@ -6,7 +6,8 @@
|
|||
* Code for converting HTML into text, for use during code generation of
|
||||
* analyzer and analysis server.
|
||||
*/
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
|
||||
final RegExp whitespace = new RegExp(r'\s');
|
|
@ -8,8 +8,8 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/src/codegen/html.dart';
|
||||
import 'package:analyzer/src/codegen/text_formatter.dart';
|
||||
import 'package:analysis_tool/html.dart';
|
||||
import 'package:analysis_tool/text_formatter.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
import 'package:path/path.dart';
|
||||
|
9
pkg/analysis_tool/pubspec.yaml
Normal file
9
pkg/analysis_tool/pubspec.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
name: analysis_tool
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: '>=2.1.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
html: any
|
||||
path: any
|
|
@ -24,5 +24,7 @@ dependencies:
|
|||
watcher: '>=0.9.6 <0.10.0'
|
||||
yaml: ^2.1.2
|
||||
dev_dependencies:
|
||||
analysis_tool:
|
||||
path: ../analysis_tool
|
||||
test: ^1.0.0
|
||||
test_reflective_loader: ^0.1.8
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/error/error.dart';
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:analyzer/src/dart/error/syntactic_errors.dart';
|
||||
import 'package:front_end/src/testing/package_root.dart' as pkgRoot;
|
||||
import 'package:front_end/src/fasta/scanner.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:front_end/src/testing/package_root.dart' as package_root;
|
||||
import 'package:path/path.dart';
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:analyzer/src/dart/analysis/experiments.dart';
|
||||
import 'package:front_end/src/fasta/scanner/string_scanner.dart';
|
||||
import 'package:front_end/src/scanner/token.dart' show Token;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:front_end/src/testing/package_root.dart' as package_root;
|
||||
import 'package:path/path.dart';
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ import 'dart:async';
|
|||
import 'dart:io' hide File;
|
||||
import 'dart:io' as io;
|
||||
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:analyzer/dart/analysis/results.dart';
|
||||
import 'package:analyzer/dart/ast/ast.dart';
|
||||
import 'package:analyzer/dart/ast/visitor.dart';
|
||||
import 'package:analyzer/dart/element/element.dart';
|
||||
import 'package:analyzer/dart/element/type.dart';
|
||||
import 'package:analyzer/file_system/physical_file_system.dart';
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analyzer/src/context/builder.dart';
|
||||
import 'package:analyzer/src/dart/analysis/byte_store.dart';
|
||||
import 'package:analyzer/src/dart/analysis/driver.dart';
|
||||
|
|
|
@ -16,5 +16,7 @@ dependencies:
|
|||
pub_semver: '^1.3.2'
|
||||
|
||||
dev_dependencies:
|
||||
analysis_tool:
|
||||
path: ../analysis_tool
|
||||
test_reflective_loader: ^0.1.8
|
||||
test: ^1.0.0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:path/path.dart';
|
||||
|
||||
import 'generate_all.dart';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import 'api.dart';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
|
||||
import 'api.dart';
|
||||
import 'from_html.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import 'api.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
|
||||
import 'api.dart';
|
||||
import 'codegen_dart.dart';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/src/codegen/html.dart';
|
||||
import 'package:analysis_tool/html.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
import 'package:html/parser.dart' as parser;
|
||||
import 'package:path/path.dart';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:path/path.dart';
|
||||
|
||||
import 'codegen_dart_protocol.dart' as codegen_dart_protocol;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/**
|
||||
* Code for enumerating the set of types implied by the API.
|
||||
*/
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
|
||||
import 'api.dart';
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
*/
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:analyzer/src/codegen/html.dart';
|
||||
import 'package:analyzer/src/codegen/tools.dart';
|
||||
import 'package:analysis_tool/html.dart';
|
||||
import 'package:analysis_tool/tools.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
|
||||
import 'api.dart';
|
||||
|
|
Loading…
Reference in a new issue