@@ -320,32 +320,54 @@ export const copyHeaders = () => {
320
320
"mkdir -p ./cpp/skia/modules/skunicode/include/" ,
321
321
"cp -a ../../externals/skia/modules/skunicode/include/SkUnicode.h ./cpp/skia/modules/skunicode/include/." ,
322
322
323
- // Remove migrated headers
324
- //grep -R "Delete this after migrating clients" cpp
325
- "rm -rf ./cpp/skia/include/gpu/GrContextThreadSafeProxy.h" ,
326
- "rm -rf ./cpp/skia/include/gpu/GrDirectContext.h" ,
327
- "rm -rf ./cpp/skia/include/gpu/GrBackendSemaphore.h" ,
328
- "rm -rf ./cpp/skia/include/gpu/mock/GrMockTypes.h" ,
329
- "rm -rf ./cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h" ,
330
- "rm -rf ./cpp/skia/include/gpu/GrTypes.h" ,
331
- "rm -rf ./cpp/skia/include/gpu/vk/GrVkTypes.h" ,
332
- "rm -rf ./cpp/skia/include/gpu/GrDriverBugWorkarounds.h" ,
333
- "rm -rf ./cpp/skia/include/gpu/GrContextOptions.h" ,
334
- "rm -rf ./cpp/skia/include/gpu/gl/GrGLExtensions.h" ,
335
- "rm -rf ./cpp/skia/include/gpu/gl/GrGLAssembleInterface.h" ,
336
- "rm -rf ./cpp/skia/include/gpu/gl/GrGLTypes.h" ,
337
- "rm -rf ./cpp/skia/include/gpu/gl/GrGLConfig.h" ,
338
- "rm -rf ./cpp/skia/include/gpu/gl/GrGLFunctions.h" ,
339
- "rm -rf ./cpp/skia/include/gpu/gl/GrGLAssembleHelpers.h" ,
340
- "rm -rf ./cpp/skia/include/gpu/gl/GrGLInterface.h" ,
341
- "rm -rf ./cpp/skia/include/gpu/GrYUVABackendTextures.h" ,
342
- "rm -rf ./cpp/skia/include/gpu/GrRecordingContext.h" ,
343
- "rm -rf ./cpp/skia/include/gpu/GrBackendSurface.h" ,
344
- "rm -rf ./cpp/skia/include/gpu/d3d/GrD3DBackendContext.h" ,
345
- "rm -rf ./cpp/skia/include/gpu/d3d/GrD3DTypes.h" ,
346
323
"rm -rf ./cpp/skia/include/pathops/SkPathOps.h" ,
347
324
] . map ( ( cmd ) => {
348
325
console . log ( cmd ) ;
349
326
$ ( cmd ) ;
350
327
} ) ;
328
+
329
+ // Check for duplicate header names and issue warnings
330
+ const duplicateHeaders = $ (
331
+ "find ./cpp -name '*.h' -type f | sed 's/.*\\///' | sort | uniq -d"
332
+ ) . toString ( ) ;
333
+ if ( duplicateHeaders . trim ( ) ) {
334
+ console . warn ( "⚠️ WARNING: Found duplicate header names:" ) ;
335
+ let hasNonGraphiteDuplicates = false ;
336
+
337
+ duplicateHeaders
338
+ . split ( "\n" )
339
+ . filter ( Boolean )
340
+ . forEach ( ( filename : string ) => {
341
+ const fullPaths = $ (
342
+ `find ./cpp -name "${ filename } " -type f`
343
+ ) . toString ( ) ;
344
+ const paths = fullPaths . split ( "\n" ) . filter ( Boolean ) ;
345
+
346
+ // Check if any of the paths contain 'graphite'
347
+ const hasGraphitePath = paths . some ( ( filePath : string ) =>
348
+ filePath . includes ( "graphite" )
349
+ ) ;
350
+
351
+ console . warn ( ` ${ filename } :` ) ;
352
+ paths . forEach ( ( filePath : string ) => {
353
+ console . warn ( ` ${ filePath } ` ) ;
354
+ } ) ;
355
+
356
+ // If it's a Graphite-related duplicate and GRAPHITE is false, don't count it as an error
357
+ if ( ! hasGraphitePath || GRAPHITE ) {
358
+ hasNonGraphiteDuplicates = true ;
359
+ } else {
360
+ console . warn (
361
+ ` (Graphite-related duplicate - ignoring since GRAPHITE=${ GRAPHITE } )`
362
+ ) ;
363
+ }
364
+ } ) ;
365
+
366
+ if ( hasNonGraphiteDuplicates ) {
367
+ console . error (
368
+ "❌ ERROR: Duplicate headers found that will cause iOS build conflicts!"
369
+ ) ;
370
+ process . exit ( 1 ) ;
371
+ }
372
+ }
351
373
} ;
0 commit comments