Skip to content
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

Glue in backup copy of github deps for generated hex files #9529

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

jwunderl
Copy link
Member

@jwunderl jwunderl commented May 24, 2023

re: microsoft/pxt-microbit#5047, hex files don't have readback of the file so packing in a little extra information isn't a big deal (ended up reading all the way back here #4373 to get full verification of that)

build: https://makecode.microbit.org/app/4cb0bf49ca15e66dce1f516a9a5bcad0bcdba4eb-3acbe76bc8#editor

way to test this:

  • open build above in a fresh incognito window, wait for a moment for everything to load in
  • open dev tools, go to network tab, toggle 'no throttling' to 'offline'.
    • ^ repeat these steps each test, as github projects get cached aggressively (in the portion of the code I'm modifying)
  • drag in one of the hex files in the attached zip (or make your own by opening the link in another browser while online, adding third party extensions, and pressing download) test-exts.zip

Leaving as a draft till I finish up webusb work, since there's a little more to get to:

  • resolve or choose to defer todos I listed in the code
  • add in hexinfo & cache when compiling extensions so hardware compilation works (<< this is the main thing, I haven't touched this portion of the code much outside of cli / electron build so just have to give it a look)
  • make webapp/src/db.ts check for the backupCopy flag when memdb misses and it grabs from local storage; if it the request goes through update storage, otherwise just fallback to backupCopy. Easy to implement, just didn't yet
    • "master" branch should do the same (store with 'backupCopy' flag) -- right now it looks like we don't cache things hitting master at all, but if we marked them as a backup, they'd only be used as a fallback / we wouldn't end up with projects that can't be opened while offline because someone forgot to tag their extension
  • hook it up with Import extension as file #5501? get it to work with transitive dependencies. (e.g. the ringbit car extension doesn't work with that flow, unless you manually drag in the neopixel one first)
  • decide to implement share url extension caching or not? nice to have but take some extra time, maybe better as a todo as it's such an edge case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant