Skip to content

Core cache directory name for esp8266 is too long on Windows. #7902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
storzinc opened this issue Aug 19, 2018 · 5 comments
Closed

Core cache directory name for esp8266 is too long on Windows. #7902

storzinc opened this issue Aug 19, 2018 · 5 comments
Labels
Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature

Comments

@storzinc
Copy link

On Windows maximum file name length is 255 characters, but in the buld log I see this line:

Archiving built core (caching) in: C:\Users\storzinc\AppData\Local\Temp\arduino_cache_875001\core\core_esp8266_esp8266_generic_CpuFrequency_80,VTable_flash,ResetMethod_ck,CrystalFreq_26,FlashFreq_40,FlashMode_qio,FlashSize_512K0,led_2,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_None____,FlashErase_none,UploadSpeed_256000_1ee66ed3f9bdc333f8cbfdd139bc1dd8.a

Arduino here is trying to create a directory with 262 characters long name, as a result no cache is created and compiller is doing full rebuild every time.

Tried this on Arduino 1.8.5, Arduino 1.9-BUILD-78 and the hourly build.

@facchinm
Copy link
Member

Hi @storzinc ,
unfortunately any way to reduce that filename length is going to affect the actual functionality (let's suppose we cut the string at some point, the cached core filename could incorrectly match another core; the wrong binary would be produced, not matching the chosen preferences).
Not using the cache in this case is slower but safer, so I'd close the issue as wontfix.

@facchinm facchinm added the Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature label Aug 20, 2018
@matthijskooijman
Copy link
Collaborator

@facchinm, there are other ways to implement matching the cache to the core. A file inside the cache directory containing these options would work. You would of course have to scan all cache directories to find the appropriate one, but that's not too much of a problem. An index file, which contains the mapping could also work and require only reading a single file.

@facchinm
Copy link
Member

@matthijskooijman I agree, there are a lot of alternative methods (hashing the filename with sha256 and using the hash as filename should be safe enough too 😉 ), I'd reopen the issue on arduino-builder as an improvement, what do you think?

@matthijskooijman
Copy link
Collaborator

Sounds good to me.

@5chufti
Copy link

5chufti commented Sep 3, 2018

some of this names (ResetMethod, FlashErase, UploadSpeed) are not really "build options" but handling options like "port". As "port" is not showing up in this filename there seems to be some "exception" that port is not treated as build option. Maybe an ammendable list of such options (or flag) would not only alleviate this issue but also help against rebuild if as little as upload speed is changed.

@facchinm facchinm reopened this Sep 4, 2018
@facchinm facchinm closed this as completed Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature
Projects
None yet
Development

No branches or pull requests

4 participants