Skip to content

Change filename of cached core to bypass Windows length limitations #284

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
facchinm opened this issue Aug 20, 2018 · 2 comments
Closed
Labels
conclusion: resolved Issue was resolved os: windows Specific to Windows operating system topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@facchinm
Copy link
Member

As reported on arduino/Arduino#7902 , if a core has many build flags the cached core filename ends up being too long (more than 255 characters).
Two possible solutions:

  • adding an index file (containing all the needed information) (0% chance of clashing filenames)
  • hashing the actual filename (with sha256 for example) and using the hash as filename (very low chance of name clashing)
@matthijskooijman
Copy link
Collaborator

A combination might also make sense: Use a hash to quickly locate a cached core, and put the full information in a file inside the cached core to verify. In the unlikely event of a hash conflict, this allows wiping the previous cache, rather than getting a broken build. Having such a file is a good idea in any case, since it allows a user to inspect a cached directory and see what it is for as well.

@JiriBilek
Copy link

Hi, just a comment to the hash collision threat. Having only a few hashed strings we can safely ignore it. See e.g. http://preshing.com/20110504/hash-collision-probabilities/probabilities/ (the table at the very bottom).

d-a-v added a commit to esp8266/Arduino that referenced this issue Sep 3, 2018
boards generator updates:
* simplified mapping description: only flash and spiffs sizes are needed
* some ldscripts are renamed due to autogenerated names
* +2M/0, +2M/512K spiffs, +4M0
* reduce length of hidden strings in boards.txt (#5100, arduino/arduino-builder#284)
* give more details in ldscripts (address, size,  +rf-cal, +sdk-wifi-settings)
@per1234 per1234 added conclusion: resolved Issue was resolved os: windows Specific to Windows operating system topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved os: windows Specific to Windows operating system topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants