The text of this is unchanged **except** I added a sentence saying to please keep the README wrapped to 80 columns. I am proposing this as a style rule (only for Markdown files).o
The reasoning here is that the README is the onboarding information that newcomers to the project need, and it should be readable via as many different approaches as possible.
While many people approach new codebases by browsing the web, some of us still do the old thing of cloning the repo and looking for descriptive files within it, and for those people we should try to work on the widest variety of terminals we can. 80 columns has been a lowest-common-denominator width since the 70s, so it makes a good target for this purpose.
I'm not hurt if people disagree, I just thought I'd offer this :)
Co-authored-by: Jake Hamilton <jake.hamilton@hey.com>
Reviewed-on: #12
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Irene Knapp <ireneista@irenes.space>
Co-committed-by: Irene Knapp <ireneista@irenes.space>
I had a usecase for assertions in the module system for my [trivial builders PR in tidepool](auxolotl/labs#24), so I added a pretty basic way of defining them.
It's somewhat quick and dirty I feel like, and given lib has hit 1.0 I precautiously added a warning "module assertions are experimental" if a module defines them, which is traced just before checking them. Assertions are not checked if `__module__.check = false`.
I also took the liberty to fixup little things in tests and the module lib (the 3 commits with `fix:`).
Each commit is rather tiny, but I split them up for review. re-formatting is in the last one.
Co-authored-by: austreelis <git@swhaele.net>
Reviewed-on: #8
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Before this commit, there existed slight confusion between the directory
name and the library scope name. For example, `lib.points.fix` is
defined in `points/default.nix` under an attribute set named `points`.
Theoretically, one could create a new directory, such as `foo`, but name
the library scope `bar`.
With this commit, the library scope is inferred from dirname
automatically. This also has the benefit of slightly reducing nesting
and reducing duplication of data. As a downside, it turns `files`, a
list of paths, into a list of strings. This is necessary because when
paths are parsed in NixLang, they become absolute paths, and so
`builtins.toString ./lists` would become "/home/foo/lib/src/lists",
which is undesirable. This is a downside, because it makes using
filepath LSP (like the one Neovim usually ships with, where it provides
autocomplete for paths) impossible, and so typos become a little easier
to make.
This is necessary for future work on migrating to RFC 145 style
doc-comments. This migration would allow us to build API documentation,
but first, the nesting needs to be removed, because `nixdoc` (an utility
to build Markdown out of doc-comments) doesn't expect it and generates
empty entries.
In I605b034fdfc537e84785ce5149e443f54e5d4e3a, we removed some
requirements for merging types - we should write some tests to make sure
that (1) they all work and (2) future updates can't break our merging
again
The type merging code is too restrictive - a bug - since as some types
that specify defaults can't be merged at all even if they should be able
to.
I've made the merging system to allow merging if any of the following
apply:
- Unmergeable properties are unspecified on one side
- Unmergeable properties have different priorities, in which case we
will take the more important priority - this allows overrides
- Unmergeable properties are the same on both sides, for example this
lets us specify everything at default priorities and have them merged
Merging each of the problem properties manually also lets us pinpoint
what the issue is and merge them in a nicer way
Change-Id: I605b034fdfc537e84785ce5149e443f54e5d4e3a
We're about to add overriding to make it so we can merge more things in
modules. Before using any of these things (although after merging), we
need to strip out the overrides
We can hijack the modules.apply.fixup function to do this, as it is
called in places where things are merged