Skip to content

Commit

Permalink
Just do the rename
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Nov 1, 2023
1 parent deb9402 commit 9d9d8dd
Show file tree
Hide file tree
Showing 41 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ name = "deno_graph"
all-features = true

[features]
type_tracing = ["deno_ast/transforms", "deno_ast/visit", "deno_ast/utils"]
symbols = ["deno_ast/transforms", "deno_ast/visit", "deno_ast/utils"]

[dependencies]
anyhow = "1.0.43"
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ mod ast;
mod graph;
mod module_specifier;

#[cfg(feature = "type_tracing")]
pub mod type_tracer;
#[cfg(feature = "symbols")]
pub mod symbols;

pub mod packages;
pub mod source;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 11 additions & 11 deletions tests/helpers/test_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ impl Loader for TestLoader {
}
}

#[cfg(feature = "type_tracing")]
pub mod tracing {
use deno_graph::type_tracer::TypeTraceDiagnostic;
#[cfg(feature = "symbols")]
pub mod symbols {
use deno_graph::symbols::TypeTraceDiagnostic;

pub struct TypeTraceResult {
pub struct SymbolsResult {
pub output: String,
pub diagnostics: Vec<TypeTraceDiagnostic>,
}
Expand Down Expand Up @@ -119,9 +119,9 @@ impl TestBuilder {
BuildResult { graph, diagnostics }
}

#[cfg(feature = "type_tracing")]
pub async fn trace(&mut self) -> anyhow::Result<tracing::TypeTraceResult> {
use deno_graph::type_tracer::ModuleSymbolRef;
#[cfg(feature = "symbols")]
pub async fn symbols(&mut self) -> anyhow::Result<symbols::SymbolsResult> {
use deno_graph::symbols::ModuleSymbolRef;

let mut graph = deno_graph::ModuleGraph::new(GraphKind::All);
let entry_point_url = ModuleSpecifier::parse(&self.entry_point).unwrap();
Expand All @@ -143,8 +143,8 @@ impl TestBuilder {
);
let capturing_parser = capturing_analyzer.as_capturing_parser();
let root_symbol =
deno_graph::type_tracer::RootSymbol::new(&graph, &capturing_parser);
Ok(tracing::TypeTraceResult {
deno_graph::symbols::RootSymbol::new(&graph, &capturing_parser);
Ok(symbols::SymbolsResult {
output: {
let entrypoint_symbol = root_symbol
.get_module_from_specifier(&entry_point_types_url)
Expand All @@ -168,8 +168,8 @@ impl TestBuilder {
));
}
let get_symbol_text =
|module_symbol: deno_graph::type_tracer::ModuleSymbolRef,
symbol_id: deno_graph::type_tracer::SymbolId| {
|module_symbol: deno_graph::symbols::ModuleSymbolRef,
symbol_id: deno_graph::symbols::SymbolId| {
let symbol = module_symbol.symbol(symbol_id).unwrap();
let definitions =
root_symbol.go_to_definitions(module_symbol, symbol);
Expand Down
8 changes: 4 additions & 4 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ async fn test_graph_specs() {
}
}

#[cfg(feature = "type_tracing")]
#[cfg(feature = "symbols")]
#[tokio::test]
async fn test_type_tracing_specs() {
async fn test_symbols_specs() {
for (test_file_path, spec) in
get_specs_in_dir(&PathBuf::from("./tests/specs/type_tracing"))
get_specs_in_dir(&PathBuf::from("./tests/specs/symbols"))
{
eprintln!("Running {}", test_file_path.display());
let mut builder = TestBuilder::new();
Expand All @@ -120,7 +120,7 @@ async fn test_type_tracing_specs() {
}
});

let result = builder.trace().await.unwrap();
let result = builder.symbols().await.unwrap();
let update_var = std::env::var("UPDATE");
let diagnostics = result
.diagnostics
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9d9d8dd

Please sign in to comment.