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

Release Herostratus 0.1.0 #57

Merged
merged 8 commits into from
Oct 20, 2024
Merged

Release Herostratus 0.1.0 #57

merged 8 commits into from
Oct 20, 2024

Conversation

Notgnoshi
Copy link
Owner

@Notgnoshi Notgnoshi commented Oct 20, 2024

Includes a few internal cleanups. This PR represents the most bare minimal working "product".

Before it's usable, the following need to be done:

  1. Allow excluding commits (Allow filtering / ignoring commits #47)
  2. Allow customizing which rules are run (Allow filtering / enabling rules #53)
  3. A "useful" output format (Support --output-format=sqlite|json #40)
  4. Remember what commits have already been processed (Remember which commits have been processed #39)
    so that repeated herostratus fetch-all && herostratus check-all
    invocations only give new achievements
  5. More achievements! (Achievement ideas #11)

I *heavily* rely on FZF in my development environment, and I've been
frustrated by the collisions between achievement and achievements. So
I'm renaming achievements -> rules, and leaving achievement as the
Achievement/Rule interface.

    rules/
        h001_fixup.rs
        h002_shortest_subject_line.rs
        ...
    achievement/
        achievement.rs
        process_rules.rs
        rule.rs
        ...
I think this doesn't actually need to be a trait, that's needlessly
OOPy.
My first attempt was to use inventory to register the impl Rule trait
objects themselves but that failed because:

1. Rules need to be mutable
2. inventory requires the registered object be const, and Box::new()
   isn't a const fn
3. inventory requires the registered object by Sized

So rather than registering the rules, register a factory you can use to
get a new Box<dyn Rule>.
It was too much, and too opinionated.
@Notgnoshi Notgnoshi merged commit 3e6eafc into main Oct 20, 2024
6 checks passed
@Notgnoshi Notgnoshi deleted the dev branch October 20, 2024 19:55
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