Repository navigation
Have attendees build and run bm before porting it - #95
Merged
Merged
Conversation
Chapter 3 introduces `bm` as the codebase attendees will port, but nothing asked them to build or run it, and the fixtures under exercises/_bm/fixtures/ were not referenced anywhere. Add a short walkthrough at the top of "How to rewrite a module": build with `make`, add and find a few bookmarks, then point `BM_DB` at fixtures/sample.bm. Warn against write commands on the fixtures, since they rewrite the database in place. Ignore the local bookmarks.bm the walkthrough creates. Closes #45
Since #86, loading fixtures/corrupt.bm stops at a duplicate URL on line 4 and bm reports a corrupt database. Add it to the walkthrough so attendees see the storage error path, not only a clean load of sample.bm, before porting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #84, which GitHub closed after an accidental force-push.
Closes #45.
Most of #45 was already fixed by 93b1454 and 7bd7b35, whose
closes #37, #40, #45only applied the keyword to #37. State on main:03_intermediatehas an exercise now.02_allocators.md.wr checkis gone.bmsource tree listsinternal.h.doSomethingare gone.The one item left was "
bmitself is never run", with the fixtures unreferenced. This PR adds a "Takebmfor a spin" section at the top of01_rewrite_a_module.md:cd exercises/_bm && make && ./bmaddtwo bookmarks, thenfindandlistBM_DB=fixtures/sample.bmwithfindandlistBM_DB=fixtures/corrupt.bm ./bm list, which shows the storage error path (bm: fixtures/corrupt.bm:4: duplicate, thencannot open ...: corrupt database, exit 1). This relies on fix(_bm): make corrupt.bm reach the storage error path #86, so main is merged into this branch.add,delandtagrewrite the database they point at, so they shouldn't be run on the fixtures. I checked:tagonsample.bmmodifies the file, whilefindandlistleave the fixtures byte-identical (bm_closeonly saves when the database is dirty).It also gitignores
exercises/_bm/bookmarks.bmandbookmarks.bm.tmp, which the walkthrough creates.make cleanalready removes both.Every command in the section was run verbatim on a copy of
exercises/_bm.