dts2hx icon indicating copy to clipboard operation
dts2hx copied to clipboard

ENAMETOOLONG

Open kevinresol opened this issue 5 years ago • 4 comments
trafficstars

when converting aws-sdk, encountered something like this: https://github.com/aws/aws-sdk-js/blob/6e552e94b78fe3198ef5fb93d7f0e0ded6f4ffd9/clients/mediaconvert.d.ts#L2561

kevinresol avatar Jul 24 '20 10:07 kevinresol

haha wow, I wonder what they're doing to generate names like that

I got the error too on macOS

ENAMETOOLONG: name too long, open '.haxelib/aws-sdk/2,719,0/global/aws/mediaconvert/__StringPatternS3MM2VVMMPPEEGGMMPP3AAVVIIMMPP4FFLLVVMMPPTTMMPPGGMM4VVTTRRPPFF4VVMM2TTSSTTSS264HH264MMKKVVMMOOVVMMTTSSMM2TTWWMMVVAASSFFVVOOBB3GGPP3GGPPPPMMXXFFDDIIVVXXXXVVIIDDRRAAWWDDVVGGXXFFMM1VV3GG2VVMMFFMM3UU8WWEEBBMMLLCCHHGGXXFFMMPPEEGG2MMXXFFMMPPEEGG2MMXXFFHHDDWWAAVVYY4MMXXMMLLHttpsMM2VVMMPPEEGGMMPP3AAVVIIMMPP4FFLLVVMMPPTTMMPPGGMM4VVTTRRPPFF4VVMM2TTSSTTSS264HH264MMKKVVMMOOVVMMTTSSMM2TTWWMMVVAASSFFVVOOBB3GGPP3GGPPPPMMXXFFDDIIVVXXXXVVIIDDRRAAWWDDVVGGXXFFMM1VV3GG2VVMMFFMM3UU8WWEEBBMMLLCCHHGGXXFFMMPPEEGG2MMXXFFMMPPEEGG2MMXXFFHHDDWWAAVVYY4MMXXMMLL.hx'

It looks like a node.js filesystem error. Quite tricky to solve but I'll have a think

haxiomic avatar Jul 24 '20 11:07 haxiomic

Manually patched the ts files and seems to generate fine now. Generated almost 80000 files 😅. https://github.com/kevinresol/hxnodejs-aws-sdk

Really well done man.

Perhaps the solution is to detect long type names and somehow encode (maybe MD5) it into a shorter one.

kevinresol avatar Jul 24 '20 12:07 kevinresol

@kevinresol yeah, that's a good idea – I think I'll take that approach given long names probably don't actually contain any real meaning

haxiomic avatar Jul 24 '20 12:07 haxiomic

I hope it all works after your patch but keen to hear if you run into any issues when using the API

haxiomic avatar Jul 24 '20 12:07 haxiomic