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

v0.0.5 #6

Merged
merged 77 commits into from
Nov 26, 2024
Merged

v0.0.5 #6

merged 77 commits into from
Nov 26, 2024

Conversation

sea-grass
Copy link
Owner

No description provided.

Since Goku commands are being split into separate binaries (currently main and serve) it doesn't make sense to treat main as the inclusion root for all tests.
Part of sqlite usage requires that the DB select query and struct type have the
same fields, in the same order. The library has a safety check for the
number of fields but does not enforce that the names of the columns and
struct fields match. This can lead to subtle bugs, so I've organized the
DB statements such that the query and return type are more closely
colocated. This way, this type of error can be caught at a glance and a
head-scratching moment may be avoided.
Through the `github.com/allyourcodebase organization I'm getting more
appropriate methods of linking with C libraries. I've manually linked
these libraries by bundling their sources all into a single library, but
it has some TODOs I'm not sure how to solve. My approach is similar
enough and after this library I can see that it's a pretty straightforward
refactor.
When I refactored such that the listener lived inside a Server
container, the public files were no longer being served. Not quite sure
what the issue is - I'm thinking it could have something to do with how
I modified the cli arg parsing, but it's not clear to me.
- Bulma and htmx packages are now simpler.
- Page iteration in the site build step now provides a more informative
error message.
kcov code coverage reporting is interesting in a few ways:

- It instruments test code as well as "real" code
  - It will report code coverage for code in your test blocks, as well.
- It will only instrument "real" code that is used in your test code
  - i.e. you can achieve 100% code coverage in a file by following all
    code paths for a single public function, if only that function is
    used in the tests.
  - Therefore 100% code coverage is only meaningful if you have some
    other metric to measure what percentage of your "real" code is
    referenced from your tests.
- Files where none of their components are referenced in tests do not
  appear in code coverage reports
  - Instead of reporting 0% code coverage, they won't be reported at
    all.
  - Therefore 100% code coverage is only meaningful if you have some
    other metric to measure what percentage of referenced files vs. all
    files.
- Code executed only at comptime is not instrumented at all
  - Maybe a test like `test { comptime { ... } }` will capture comptime
  coverage, but I'm not sure.
  - No indication whether a comptime function or type function is
    referenced.
  - Manual assurance that these are referenced is required; compilation
    of the test binary would be considered a "silent metric" for program
    correctness.
`src/test.zig` renamed to `src/root.zig` to indicate to the build system
that this file should be used as the root module for docs generation.

All referenced files are made public in `src/root.zig` in order for docs
to generate links to each type/namespace; these aren't meant to be
imported through `src/root.zig` in actual code.

> If the system doesn't find a file named "foo/root.zig" or "foo/foo.zig", it will use the first file in the tar as the module root.
>
> See: https://github.com/ziglang/zig/wiki/Contributing/3bd4232c3fd11284a00f871e1a7d4c90667dda3f#the-sources-tarball
The pages table now stores the template name.

Error reporting was improved for these cases:

- If pages dir is missing, suggests to create it
- If templates dir is missing, suggests to create it
- If required frontmatter fields slug, title, or template are missing,
  prints specific message
- If a page references a non-existent template, an informative error is
  printed
- If a template is empty, an informative error is printed
@sea-grass sea-grass changed the title WIP v0.0.5 v0.0.5 Nov 26, 2024
@sea-grass sea-grass marked this pull request as ready for review November 26, 2024 17:47
@sea-grass sea-grass merged commit df1a4d2 into main Nov 26, 2024
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.

1 participant