@@ -89,29 +89,29 @@ namespace RWC {
89
89
const uniqueNames = ts . createMap < true > ( ) ;
90
90
for ( const fileName of fileNames ) {
91
91
// Must maintain order, build result list while checking map
92
- const normalized = ts . normalizeSlashes ( fileName ) ;
92
+ const normalized = ts . normalizeSlashes ( Harness . IO . resolvePath ( fileName ) ) ;
93
93
if ( ! uniqueNames . has ( normalized ) ) {
94
94
uniqueNames . set ( normalized , true ) ;
95
95
// Load the file
96
- inputFiles . push ( getHarnessCompilerInputUnit ( fileName ) ) ;
96
+ inputFiles . push ( getHarnessCompilerInputUnit ( normalized ) ) ;
97
97
}
98
98
}
99
99
100
100
// Add files to compilation
101
101
for ( const fileRead of ioLog . filesRead ) {
102
- const normalized = ts . normalizeSlashes ( fileRead . path ) ;
103
- if ( ! uniqueNames . has ( normalized ) && ! Harness . isDefaultLibraryFile ( fileRead . path ) ) {
104
- uniqueNames . set ( normalized , true ) ;
105
- otherFiles . push ( getHarnessCompilerInputUnit ( fileRead . path ) ) ;
102
+ const unitName = ts . normalizeSlashes ( Harness . IO . resolvePath ( fileRead . path ) ) ;
103
+ if ( ! uniqueNames . has ( unitName ) && ! Harness . isDefaultLibraryFile ( fileRead . path ) ) {
104
+ uniqueNames . set ( unitName , true ) ;
105
+ otherFiles . push ( getHarnessCompilerInputUnit ( unitName ) ) ;
106
106
}
107
- else if ( ! opts . options . noLib && Harness . isDefaultLibraryFile ( fileRead . path ) && ! uniqueNames . has ( normalized ) && useCustomLibraryFile ) {
107
+ else if ( ! opts . options . noLib && Harness . isDefaultLibraryFile ( fileRead . path ) && ! uniqueNames . has ( unitName ) && useCustomLibraryFile ) {
108
108
// If useCustomLibraryFile is true, we will use lib.d.ts from json object
109
109
// otherwise use the lib.d.ts from built/local
110
110
// Majority of RWC code will be using built/local/lib.d.ts instead of
111
111
// lib.d.ts inside json file. However, some RWC cases will still use
112
112
// their own version of lib.d.ts because they have customized lib.d.ts
113
- uniqueNames . set ( normalized , true ) ;
114
- inputFiles . push ( getHarnessCompilerInputUnit ( fileRead . path ) ) ;
113
+ uniqueNames . set ( unitName , true ) ;
114
+ inputFiles . push ( getHarnessCompilerInputUnit ( unitName ) ) ;
115
115
}
116
116
}
117
117
} ) ;
0 commit comments