diff --git a/src/transpilation/resolve.ts b/src/transpilation/resolve.ts index a3ac4f92a..8643f6c86 100644 --- a/src/transpilation/resolve.ts +++ b/src/transpilation/resolve.ts @@ -161,7 +161,7 @@ function resolveFileDependencies(file: ProcessedFile, context: ResolutionContext dependencies.push(...resolvedDependency.resolvedFiles); diagnostics.push(...resolvedDependency.diagnostics); } - return { resolvedFiles: dependencies, diagnostics }; + return { resolvedFiles: deduplicateResolvedFiles(dependencies), diagnostics }; } function resolveDependency( @@ -174,7 +174,7 @@ function resolveDependency( const fileDirectory = path.dirname(requiringFile.fileName); if (options.tstlVerbose) { - console.log(`Resolving "${dependency}" from ${normalizeSlashes(fileDirectory)}`); + console.log(`Resolving "${dependency}" from ${normalizeSlashes(requiringFile.fileName)}`); } // Check if the import is relative diff --git a/test/transpile/__snapshots__/project.spec.ts.snap b/test/transpile/__snapshots__/project.spec.ts.snap index 1effba209..ce03539da 100644 --- a/test/transpile/__snapshots__/project.spec.ts.snap +++ b/test/transpile/__snapshots__/project.spec.ts.snap @@ -11,7 +11,7 @@ Array [ "Constructing emit plan", "Resolving dependencies for /test/transpile/project/otherFile.ts", "Resolving dependencies for /test/transpile/project/index.ts", - "Resolving \\"./otherFile\\" from /test/transpile/project", + "Resolving \\"./otherFile\\" from /test/transpile/project/index.ts", "Resolved ./otherFile to /test/transpile/project/otherFile.ts", "Emitting output", "Emitting /test/transpile/project/otherFile.lua",