<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<title>Posts | GlitchlessCode</title>
	<subtitle>Read my various posts...</subtitle>
	<link rel="self" type="application/atom+xml" href="https://glitchlesscode.ca/posts/feed.xml"/>
  <link rel="alternate" type="text/html" href="https://glitchlesscode.ca/posts/"/>
  
	<updated>2025-11-09T00:00:00+00:00</updated>
	
	<id>https://glitchlesscode.ca/posts/feed.xml</id>
	<entry xml:lang="en">
		<title>Witness Generation Wrap Up - GSoC 2025</title>
		<published>2025-11-05T00:00:00+00:00</published>
		<updated>2025-11-09T00:00:00+00:00</updated>
		<link rel="alternate" type="text/html" href="https://glitchlesscode.ca/posts/2025-11-05a/"/>
		<id>https://glitchlesscode.ca/posts/2025-11-05a/</id>
    
		<content type="html" xml:base="https://glitchlesscode.ca/posts/2025-11-05a/">&lt;p&gt;A quick note about this blog post: &lt;strong&gt;This post also serves as a part of my final submission for Google Summer of Code 2025&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;strong&gt; If it
seems a bit heavier on the code and details, understand that this has to serve as a resource to future contributors, and proof of my
work over the past 23 weeks.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h1 id=&quot;a-quick-introduction&quot;&gt;A Quick Introduction&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-quick-introduction&quot; aria-label=&quot;Anchor link for: a-quick-introduction&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Frankly, I have no idea how to start this, so I guess I&#x27;ll jump straight to the point: I&#x27;m
&lt;span class=&quot;no-wrap&quot;&gt;Talyn &lt;span class=&quot;subtle&quot;&gt;(@glitchlesscode)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;, and I&#x27;ve been working on adding &lt;strong&gt;Witness Generation&lt;&#x2F;strong&gt;
to &lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt; as my &lt;strong&gt;Google Summer of Code&lt;&#x2F;strong&gt;
project. You can find the &lt;em&gt;original&lt;&#x2F;em&gt; proposal &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;summerofcode.withgoogle.com&#x2F;programs&#x2F;2025&#x2F;projects&#x2F;MMRSG9WU&quot;&gt;here&lt;&#x2F;a&gt;, though be aware
that some of the focus has changed with time. I will cover this more in the &lt;a href=&quot;https:&#x2F;&#x2F;glitchlesscode.ca&#x2F;posts&#x2F;2025-11-05a&#x2F;#my-project-goals&quot;&gt;summary of the project&#x27;s goals&lt;&#x2F;a&gt;. This
project conclusion should hopefully serve as an accurate summary of what has and has not been done, some of the design details and
decisions, as well as where to find all of the work I&#x27;ve made.&lt;&#x2F;p&gt;
&lt;p&gt;I personally believe that this project has been an overall success, in spite of the semi-prototypal result&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#3&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. I have achieved creation of a
largely operable and easily expandable system, which is frankly a result I am incredibly happy with and proud of.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;a-note-on-formality&quot;&gt;A Note On Formality&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-note-on-formality&quot; aria-label=&quot;Anchor link for: a-note-on-formality&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;My goal with this blog is always to maintain some level of informality. I don&#x27;t want to feel like an artificial being on the other side
of the internet, and I find the best way to do this is to simply write in a much more relaxed manner. However, you may find this blog
post has an ever so slight increase in effort to even the slighest level of formality from me. Yet, I will still attempt to still balance
this with a level informality, it&#x27;s simply how I&#x27;m most comfortable writing these.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;project-summary&quot;&gt;Project Summary&lt;a class=&quot;zola-anchor&quot; href=&quot;#project-summary&quot; aria-label=&quot;Anchor link for: project-summary&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;At its core, this project had as a goal to enable witness generation in &lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt;.
Since I&#x27;m &lt;em&gt;very&lt;&#x2F;em&gt; aware that sentence would mean next-to-nothing to somebody who has never heard any of that before, I&#x27;ve included a little recap below
for anybody who needs it.&lt;&#x2F;p&gt;
&lt;details &gt;
  &lt;summary&gt;&lt;span&gt;What Is Witness Generation?&lt;&#x2F;span&gt;&lt;&#x2F;summary&gt;
  &lt;p&gt;The cargo subcommand &lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt; is a tool created
with the goal of catching breaking changes to rust crates, such that semantic versioning is always respected. This is performed by the tool using
the &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;trustfall&#x2F;&quot;&gt;&lt;code&gt;trustfall&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; query engine, a powerful query engine for matching patterns in large datasets. To go in depth
as to what &lt;em&gt;exactly&lt;&#x2F;em&gt; &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;trustfall&#x2F;&quot;&gt;&lt;code&gt;trustfall&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; can do could take up
&lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;predr.ag&#x2F;blog&#x2F;how-to-query-almost-everything-hytradboi&#x2F;&quot;&gt;it&#x27;s own entire blog post&lt;&#x2F;a&gt;&lt;&#x2F;span&gt;, so I won&#x27;t cover it all here.
However, at surface level, it&#x27;s enough to understand that given nearly any set of data, an &quot;adapter&quot; can be written over top of this data, allowing
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;trustfall&#x2F;&quot;&gt;&lt;code&gt;trustfall&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; to rapidly search the data for matching patterns using a consistent query language, which is itself
incredibly similar to GraphQL. In our case, we use one of these &quot;adapters&quot; to query the rustdoc created from a given crate, which gives us access to the large
amount of type information included in the rustdoc. For our purposes, we write a new query, or &quot;lint&quot; for each possible breaking change. For instance, at the time of
writing, &lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt; has approximately 200 lints currently implemented,
which means 200 queries which had to be created. However, we know this process can be fallible, there can be unpredicted edge-cases in the very lints we use to
catch other people&#x27;s semantic versioning mistakes! This can create instants where lints detect a breaking change where there is none, which is evidently
problematic.&lt;&#x2F;p&gt;
&lt;p&gt;Additionally, triggered lints are not always immediately clear as to what the break in the downstream code would actually be (i.e. what it could look like).
This is especially problematic for end-users who are likely less familiar with the many ways their code could produce breaking changes. Knowing what the
breaking change is, is one thing, knowing exactly what that looks like downstream is another, which can be incredibly helpful information!&lt;&#x2F;p&gt;
&lt;p&gt;The goal of witness generation is to hopefully remedy both of the above issues, as well as one other issue that will be discussed later. So, how
can we do that? Well, the baseline thought is as follows: &lt;strong&gt;&#x27;What if we just generate a possible example of the downstream code, and then check?&#x27;&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This is done by making a template of what breaking downstream code could look like, and then rendering the template using the values extracted by
the original lint. This is created as a rust crate, and then is tested twice using &lt;code&gt;cargo check&lt;&#x2F;code&gt;. One time, it is tested using the &lt;code&gt;baseline&lt;&#x2F;code&gt; version
of your crate as a dependency, the other time, it uses the &lt;code&gt;current&lt;&#x2F;code&gt; version. This then allows us to validate that the breaking change we expected
would happen, as per the lint, has in fact happened.&lt;&#x2F;p&gt;
&lt;p&gt;As a happy side effect, this also serves to solve the second problem, specifically, we can just keep the generated witness crates after generating them.
We can then point the end-user to these witnesses as clear proof of how a given breaking change is actually a breaking change.&lt;&#x2F;p&gt;

&lt;&#x2F;details&gt;
&lt;p&gt;This has all been done by myself, working under my mentor, &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;predr.ag&#x2F;&quot;&gt;Predrag Gruevski&lt;&#x2F;a&gt;, across two separate GitHub repositories,
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;the base &lt;span class=&quot;no-wrap&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;span&gt; repo&lt;&#x2F;a&gt;, as well as
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;GlitchlessCode&#x2F;cargo-semver-checks&#x2F;&quot;&gt;my working repo&lt;&#x2F;a&gt;, which is simply a fork of the original.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;my-project-goals&quot;&gt;My Project Goals&lt;a class=&quot;zola-anchor&quot; href=&quot;#my-project-goals&quot; aria-label=&quot;Anchor link for: my-project-goals&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;I mentioned earlier, the goals for this project have shifted at least to some degree, between the original proposal and now. This is largely due to
a mix of these:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Additional uses for witnesses were added as additional, more important goals than those originally proposed.&lt;&#x2F;li&gt;
&lt;li&gt;A number of personal life and health problems, of which I am not comfortable sharing publicly, removed a substantial amount of the time with which
I could have worked on the project.&lt;&#x2F;li&gt;
&lt;li&gt;Although a time extension was taken to try to account for that time loss, my work then had to fit in between all my university work. As such, we had
to shift scope and goals.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Now, it would still be good to go over the original set of goals that were set for this project, so lets do that. Below are all the original goals from
my back in April of this year. They&#x27;ve been labelled as either &lt;code&gt;Complete&lt;&#x2F;code&gt; or &lt;code&gt;Incomplete&lt;&#x2F;code&gt; based on how I personally believe these goals were accomplished.
Note that none of these are marked as not being done&#x2F;as being failed, every goal was worked on to some degree or another.&lt;&#x2F;p&gt;
&lt;div class=&quot;indent&quot;&gt;

&lt;blockquote class=&quot;callout incomplete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM7 11H17V13H7V11Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Community Engagement&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;This was frankly the smallest goal of my proposal. I remembered seeing blog posts from members of GSoC 2024 across various platforms, which I always
enjoyed reading. They are also the main reason I even heard about GSoC and considered applying this year, which is something I was hoping to continue on this
year. More specifically, I wrote that I was hoping to give updates in the form of blog posts every 3 weeks. Unfortunately, between all the other time
stressors, including my GSoC project itself, I did not find the time to make many of those posts. I don&#x27;t find much of problem with this goal being
incomplete though, it was not essential to the functioning of this project.&lt;&#x2F;p&gt;

&lt;blockquote class=&quot;callout complete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Project Research &amp;amp; Planning&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;This goal was completed quite easily, it largely entailed communicating with my mentor, Predrag, about the expectations and plans for how to layout the system.
I would personally say that this was a continuous process over the course of GSoC, even if the main intent was to just have a rock-solid plan coming going
into the development time. This project is just one that constantly has factors that could not be easily predicted, and requires constant adaptation.&lt;&#x2F;p&gt;

&lt;blockquote class=&quot;callout complete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Fundamental Witness System&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;At its core, the witness system has a basic fundamental chain of operations, which is added as a simple extension, adjacent to what
&lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt; already does. It just adds an extra step which acts with
entirely non-fatal operations, even if they can be fallible. This foundation is fully implemented, and allows for a simple set of additional values in each lint.
Namely, it introduces witness queries and witness templates. The former allows for a second, information collecting query to be run on any lints that matched,
while the latter is the template which is rendered to create the witness.&lt;&#x2F;p&gt;

&lt;blockquote class=&quot;callout complete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Automated Witness Verification &amp;amp; Diagnostics&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;The witness system&#x27;s utility is largely dependent on the presence of automated testing and reporting of any generated witnesses. This goal accounts for that set
of features, in which all witness crates are tested using &lt;span class=&quot;no-wrap&quot;&gt;&lt;code&gt;cargo check&lt;&#x2F;code&gt;&lt;&#x2F;span&gt; against both the baseline and current versions of the test
crate. After having run these witnesses, witness results are then collected into a single report, which is displayed to the end user along with any of the other
end-of-operation reports. Witness checks which error at any step are still collected, including some incredibly minimal diagnostics, and are also reported to
the end user.&lt;&#x2F;p&gt;

&lt;blockquote class=&quot;callout incomplete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM7 11H17V13H7V11Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Adding Witnesses To Many Existing Lints&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;There was originally a goal to add witnesses to a large number of the existing lints. However, given the scope adjustments this project received, the end goal
has shifted away from having widespread witness coverage, and rather to have a few working witnesses in a few different categories. Looking at this statement,
I know the immediate assumption is likely that this project was dramatically overscoped. While that is true to some extent, I want to emphasize that the time
that could have been used for writing witnesses was instead repurposed to add extra, incredibly useful features, which are covered below.&lt;&#x2F;p&gt;

&lt;blockquote class=&quot;callout incomplete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM7 11H17V13H7V11Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Witness System Touchups&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;This goal was largely in place under the assumption that the whole witness system would be less prototypal than it still is. So, touchups and results are
continuously occurring, even now, as we work towards a much more production-ready solution. I can&#x27;t really say that touchups are complete, since we&#x27;re still
off from having that in a great state, but I am still incredibly happy with the level of polish on what is either there, or on how we plan to rework the
rougher systems following GSoC. I&#x27;d also like to make it clear that this incomplete goal is once again donating some its potential dev time to the additional
goals added after, which is why it is incomplete.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;So, that&#x27;s a little summary of all the original project goals, and their results. However, as was repeatedly mentioned, we added some new goals during the
process of development, so why don&#x27;t we go over those too?&lt;&#x2F;p&gt;
&lt;div class=&quot;indent&quot;&gt;

&lt;blockquote class=&quot;callout incomplete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM7 11H17V13H7V11Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Witness Dependent Lints&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;Witness dependent linting is a form of linting which creates a way to test for breaking changes that simply could not be reliably confirmed using only the
existing &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;trustfall&#x2F;&quot;&gt;&lt;code&gt;trustfall&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; based system. Let&#x27;s take two simple examples of changes in code:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#C6D0F5, #CDD6F4); background-color: light-dark(#303446, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt; Old version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; function_with_parameter_changed&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; i32&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt;  todo!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt; New version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; function_with_parameter_changed&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; i64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt;  todo!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This above example is obviously a breaking change, we&#x27;ve changed a parameter from accepting an &lt;code&gt;i32&lt;&#x2F;code&gt; to accepting an &lt;code&gt;i64&lt;&#x2F;code&gt;! Now look at this example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#C6D0F5, #CDD6F4); background-color: light-dark(#303446, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt; Old version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; explicit_arg_to_impl_trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; i64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt;  todo!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt; New version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; explicit_arg_to_impl_trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; Into&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;i64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt;  todo!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Is this a breaking change? No! All we just converted the explicit &lt;code&gt;i64&lt;&#x2F;code&gt; parameter to &lt;code&gt;Into&amp;lt;i64&amp;gt;&lt;&#x2F;code&gt;, which &lt;code&gt;i64&lt;&#x2F;code&gt; obviously implements. So, a piece of downstream
code might look like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#C6D0F5, #CDD6F4); background-color: light-dark(#303446, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; witness&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; i64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt; Snip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt;  explicit_arg_to_impl_trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);font-style: italic;&quot;&gt; Snip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This would still work both before and after! However, using only &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;trustfall&#x2F;&quot;&gt;&lt;code&gt;trustfall&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, we can&#x27;t really check for edge cases like this,
it can only determine &quot;The function signature changed&quot;. Clearly, this isn&#x27;t always a breaking change, so how can we test for this correctly? We can do some heavier
parsing&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#4&quot;&gt;4&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; on the rustdoc, generate a witness using that additional information, and then check to see if the witness sees a breaking change. If we then decide
to base the overall lint&#x27;s result on the result we just found from the witness, we&#x27;ve got an experimentally provable success&#x2F;fail condition.&lt;&#x2F;p&gt;
&lt;p&gt;This is the concept for what witness dependent linting is, which is already in a working state, even if it is a little rough around the edges. The current
prototype adds checks for changed parameter types in both standalone functions and in methods in non-trait implementations. This is a fantastic step in the
right direction for how to expand &lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt;, it allows us to
test for breakages we just could not even test for before!&lt;&#x2F;p&gt;

&lt;blockquote class=&quot;callout complete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Witness Dependent Lint Unit Testing&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;Evidently, to be able to trust a system that complex, we want a way to test it.
&lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt; already has a snapshot-based testing system, which
outputs all matches of a given lint across a wide set of test crates in the repository. Each of these crates are designed to contain specific examples of
breaking changes, as well various edge cases to ensure we only report actual breaking changes. I have since added to this system to make witness-dependent
lints also run their witnesses during testing scenarios, and only output that which they find to be breaking changes, bringing witness-dependent lints into
the existing testing ecosystem.&lt;&#x2F;p&gt;

&lt;blockquote class=&quot;callout complete no-title&quot;&gt;
  
  
  &lt;div class=&quot;icon&quot;&gt;
    &lt;svg xmlns=&quot;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&quot; viewBox=&quot;0 0 24 24&quot; width=&quot;18&quot; height=&quot;18&quot;&gt;&lt;path d=&quot;M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z&quot; fill=&quot;currentColor&quot;&gt;&lt;&#x2F;path&gt;&lt;&#x2F;svg&gt;

  &lt;&#x2F;div&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Witness Dependent Lint Crate Deletion&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;

  &lt;&#x2F;div&gt;
  
&lt;&#x2F;blockquote&gt;

&lt;p&gt;Witness dependent lints obviously depend on the witness system to provide a final result. In the case that a breaking change is found, it&#x27;s smart to just
keep the witness around, it performs the job that any other witness already does, on top of supplying a final result to the lint. However, if the witness
finds no breaking change, then we don&#x27;t need the witness crate anymore, it will just take up space. As such, I implemented a simple system to remove any
witness crates. It removes only the files that should be generated by witness checking, and if any error is encountered during this process, it fails
safely by disabling witness crate deletion for the remainder of the run, as well as printing a warning to the user. This way, the run can still complete,
it just won&#x27;t try to delete any more unnecessary witness crates.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;a-note-on-project-completion&quot;&gt;A Note On Project Completion&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-note-on-project-completion&quot; aria-label=&quot;Anchor link for: a-note-on-project-completion&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Again, this witness system is clearly not &lt;em&gt;finished&lt;&#x2F;em&gt;, though it&#x27;s in a state where much of what needs to be possible to do is implemented in enough of a
capacity that it is expandable. However, the system is not yet stable enough to merge into the main branch of the repository. I, along with Predrag, have
plans to continue the development and stabilization of the witness system following GSoC. Currently, some of the simpler work has been merged into &lt;code&gt;main&lt;&#x2F;code&gt;,
some of it will be merged into &lt;code&gt;feat&#x2F;witness-based-linting&lt;&#x2F;code&gt;, and at least at the time of writing, a major part is still in a pull request.&lt;&#x2F;p&gt;
&lt;p&gt;Here is where you can find &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;tree&#x2F;main&quot;&gt;main&lt;&#x2F;a&gt;,
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;tree&#x2F;feat&#x2F;witness-based-linting&quot;&gt;my feature branch&lt;&#x2F;a&gt;, and
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;pull&#x2F;1467&quot;&gt;my current outstanding PR&lt;&#x2F;a&gt;,
as well as &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;pulls?q=is%3Apr+author%3AGlitchlessCode&quot;&gt;all pull requests I&#x27;ve made in this repository&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;a-detour-for-refactoring&quot;&gt;A Detour For Refactoring&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-detour-for-refactoring&quot; aria-label=&quot;Anchor link for: a-detour-for-refactoring&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;I&#x27;d like to shine a light on the fact that a major roadblock in the middle of this project was the necessity to refactor the existing system which generates
rustdoc files. Specifically, the previous system posed a problem to retrieving the forms in which both &lt;code&gt;baseline&lt;&#x2F;code&gt; and &lt;code&gt;current&lt;&#x2F;code&gt; version of the test crate are
accessed. &lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt; can work on versions of crates found on
&lt;code&gt;crates.io&lt;&#x2F;code&gt;, in another local directory, or in a git revision, as well as just being able to operate on pre-generated rustdoc files. To account for this,
rustdoc used to be generated using a dynamically dispatched system, which used a trait that looked like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#C6D0F5, #CDD6F4); background-color: light-dark(#303446, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;crate&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; RustdocGenerator&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; load_rustdoc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;        &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E78284, #F38BA8);&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;        config&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; GlobalConfig&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;        generation_settings&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; super&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);&quot;&gt;data_generation&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt;GenerationSettings&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;        cache_settings&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; super&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);&quot;&gt;data_generation&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt;CacheSettings&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;        crate_data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt;CrateDataForRustdoc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt;_&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;    )&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt;VersionedStorage&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; TerminalError&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This trait was then implemented on variety of rustdoc generator types, one for each way rustdoc can be loaded. However, for witness generation, we want to know
whether we are depending on a local copy, or on a &lt;code&gt;crates.io&lt;&#x2F;code&gt; release, since we need to construct a &lt;code&gt;Cargo.toml&lt;&#x2F;code&gt; file with our dependencies for every witness.
This type-erasing, black-box approach to generating rustdoc means, however, that this data we want is buried deep in this abstraction. To complicate things
even further, passing a rustdoc file as an input is not actually valid for witnesses, since we need to depend on code which exists somewhere, but the rustdoc
can be placed anywhere, entirely unrelated to the source code it refers to.&lt;&#x2F;p&gt;
&lt;p&gt;So, we have this black box system which is hiding data we need, although this data is itself not always present for all data sources. We found that the best
way to make this work for what we need was to just do a sizeable refactor. The dynamically dispatched trait-based system was moved to an enum&#x2F;state-machine hybrid,
where the state machine represents current processing state, and the enum represents the different variants of data. This refactor allowed much easier access to
both that data we needed, and the overall flow of the data during processing, which may have benefits in the future.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;insights-design-decisions&quot;&gt;Insights &amp;amp; Design Decisions&lt;a class=&quot;zola-anchor&quot; href=&quot;#insights-design-decisions&quot; aria-label=&quot;Anchor link for: insights-design-decisions&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Some of the rationales and design decisions made during the creation of this system are not always obvious, I&#x27;d like to go over some of the bigger or more
interesting ones. This is both to just show off what&#x27;s been done, but also to help anybody who may wish to help out with furthering the development of witnesses.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;run-id-generation&quot;&gt;Run ID Generation&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-id-generation&quot; aria-label=&quot;Anchor link for: run-id-generation&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;The witness crates need to be placed somewhere, obviously, and so we place them in
&lt;span class=&quot;no-wrap&quot;&gt;&lt;code&gt;.&#x2F;target&#x2F;semver-checks&#x2F;{RUN_ID}-{CRATE_NAME}&#x2F;{WITNESS_NAME}-{INDEX}&lt;&#x2F;code&gt;&lt;&#x2F;span&gt;, which makes for a very nice organization. However, clearly that
means we need a run ID so each run can be uniquely identified. This is done by generating a string of 6 random alphanumeric characters. If you&#x27;re wondering what&#x27;s
all that confusing by this decision, I should point out that the count of random characters (6), may seem quite arbitrary. To explain this number exactly would
take far too long, but I recommend looking at The Birthday Problem&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#5&quot;&gt;5&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. Long story short, 6 random characters with a possible selection set of 62 unique characters
gives us sufficient probability to avoid collisions. We aren&#x27;t doing anything cryptographic or randomly significant, we don&#x27;t need massive unique IDs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;fallibility&quot;&gt;Fallibility&lt;a class=&quot;zola-anchor&quot; href=&quot;#fallibility&quot; aria-label=&quot;Anchor link for: fallibility&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Most errors throughout the rest of &lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt; are considered
fatal, and will cause an early exit. However, witnesses are not &lt;em&gt;absolutely&lt;&#x2F;em&gt; necessary for it to do what it&#x27;s intended to do, at least for anything that is
not a witness-dependent lint. Witnesses are largely just a nice thing to have for the end-user, and as such, the entire witness system is designed to be as
infallible as possible. Errors are continuously collected and propagated upwards as necessary, but it will always try to drive itself forward, through the
rest of the witness system. The result is a system which, while it can experience failures, will almost never cause the entire process to panic and exit
early.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;query-running&quot;&gt;Query Running&lt;a class=&quot;zola-anchor&quot; href=&quot;#query-running&quot; aria-label=&quot;Anchor link for: query-running&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;trustfall&lt;&#x2F;code&gt; queries are run originally to find all instances of changes in the public API of a crate which would be considered breaking. These also allow us
to export values about those matching cases so we can use them in witness generation and change reporting. However, sometimes we want to extract values which
are not explicitly correlated to the reporting of the change, nor to the matching process, and are instead solely used for witness generation. As such, I&#x27;ve
added an extra step before witness generation, called the witness query. This stage is designed specifically to extract these additional values, only on
cases which have matched earlier. Now, it&#x27;s important to note that initial query produces a &lt;code&gt;Vec&lt;&#x2F;code&gt; of maps which correlate string keys to the outputted values,
one map for every time the lint matched something. However, if we just run the witness query, we can&#x27;t be sure it&#x27;ll produce the data we want &lt;em&gt;for the same
matching case&lt;&#x2F;em&gt;, at least not without repeating work by re-matching the same criteria.&lt;&#x2F;p&gt;
&lt;p&gt;So, instead of running the witness query once &lt;em&gt;total&lt;&#x2F;em&gt;, we run it once &lt;em&gt;per match&lt;&#x2F;em&gt;, where you are expected to design the witness query to speedily match on the
desired item by just matching on the importable path of the target item. This is powered by the fact that the witness query can inherit arguments&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#6&quot;&gt;6&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; from the
original lint, meaning we can output defining factors, such as the importable path of the item, and then inherit them as arguments to the witness query. However,
this process can technically match multiple items, or no items at all, if the witness query is badly designed. As a result, the witness query will fail with an
error if anything other than exactly one match is produced from the witness query. Note that this will only block the creation of that single witness crate, if
all other witness queries operate successfully, then all but the one witness crate will continue to be created and tested.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;witness-templating&quot;&gt;Witness Templating&lt;a class=&quot;zola-anchor&quot; href=&quot;#witness-templating&quot; aria-label=&quot;Anchor link for: witness-templating&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;The witness template system is used to render witnesses using data extracting from the original query merged with the result from the witness query, and uses the
&lt;code&gt;handlebars&lt;&#x2F;code&gt; crate, which provides a very flexible method for injecting values into preset strings. This definitely makes designing lints relatively easy, though they
may not always make the most sense when just looking at them, unrendered. For instance, you can end up with templates that look a bit like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#C6D0F5, #CDD6F4); background-color: light-dark(#303446, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{#if (or old_unsafe new_unsafe)}}unsafe {{&#x2F;if}}fn witness({{#each baseline_arg_types}}val{{@index}}: {{this}}{{#unless @last}}, {{&#x2F;unless}}{{&#x2F;each}}) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    {{join &amp;quot;::&amp;quot; path}}({{#each baseline_arg_types}}val{{@index}}{{#unless @last}}, {{&#x2F;unless}}{{&#x2F;each}});&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Although this looks frankly kinda disgusting as far as code goes, this results in very clean and correct rust code in the generated witness. That&#x27;s the entire
rationale for having code that looks like this. It may not look pretty in the lint, but the resulting end-user experience is great.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;witness-crate-splitting&quot;&gt;Witness Crate Splitting&lt;a class=&quot;zola-anchor&quot; href=&quot;#witness-crate-splitting&quot; aria-label=&quot;Anchor link for: witness-crate-splitting&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Throughout this entire blog post, I&#x27;ve been simplifying something quite notable. Specifically, I&#x27;ve been claiming that for each match, a single witness crate is
generated. In reality, we actually that we generate &lt;em&gt;two&lt;&#x2F;em&gt; witness crates &lt;em&gt;for each match&lt;&#x2F;em&gt;. The reason this is necessary at all, however, is rooted in how &lt;code&gt;cargo&lt;&#x2F;code&gt;
handles &lt;code&gt;Cargo.lock&lt;&#x2F;code&gt; conflicts. Originally, the way that witnesses were created was by having a single crate, with both dependencies in the &lt;code&gt;Cargo.toml&lt;&#x2F;code&gt; as differently
named dependencies, which looked something a bit like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#C6D0F5, #CDD6F4); background-color: light-dark(#303446, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;name&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;witness_name-0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;version&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;1.0.0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;edition&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;2024&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;lib&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;src&#x2F;lib.rs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;features&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;baseline&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;dependencies&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;baseline&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;span&gt; path&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&#x2F;path&#x2F;to&#x2F;baseline&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; package&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;crate_name&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;current&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;span&gt; path&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&#x2F;path&#x2F;to&#x2F;current&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; package&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;crate_name&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A6D189, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We would then inject a &quot;&lt;strong&gt;prelude&lt;&#x2F;strong&gt;&quot; above the generated witness text which re-imported either &lt;code&gt;baseline&lt;&#x2F;code&gt; or &lt;code&gt;current&lt;&#x2F;code&gt;, while also renaming it back to its original name,
dependent on if the &lt;code&gt;baseline&lt;&#x2F;code&gt; flag was set or not. This worked great, except for one critical flaw: &lt;code&gt;cargo&lt;&#x2F;code&gt; requires that the &lt;code&gt;Cargo.lock&lt;&#x2F;code&gt; file only ever contains one
package with a given name and version. This meant that if the &lt;code&gt;current&lt;&#x2F;code&gt; version of the crate had the same version of the &lt;code&gt;baseline&lt;&#x2F;code&gt;, the witness would &lt;em&gt;always&lt;&#x2F;em&gt; fail to be
checked by &lt;code&gt;cargo&lt;&#x2F;code&gt;, since it would run into a conflict, having two crates with identical package names and versions.&lt;&#x2F;p&gt;
&lt;p&gt;Since we don&#x27;t want to require that you &lt;em&gt;must&lt;&#x2F;em&gt; update your version between two comparisons, the evident solution is to generate &lt;strong&gt;two&lt;&#x2F;strong&gt; witness crates, each with identical
code, one with the &lt;code&gt;baseline&lt;&#x2F;code&gt; version as a dependency, the other with the &lt;code&gt;current&lt;&#x2F;code&gt; version. This separates the two entirely, making it so once again, we can trust that
&lt;code&gt;cargo&lt;&#x2F;code&gt; should be able to accurately check our witness.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;baseline-flag&quot;&gt;Baseline Flag&lt;a class=&quot;zola-anchor&quot; href=&quot;#baseline-flag&quot; aria-label=&quot;Anchor link for: baseline-flag&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;As was &lt;a href=&quot;https:&#x2F;&#x2F;glitchlesscode.ca&#x2F;posts&#x2F;2025-11-05a&#x2F;#witness-crate-splitting&quot;&gt;just mentioned&lt;&#x2F;a&gt;, compared to the first iteration of witness checking, we now split our crates into two. Consequently, one might assume that
we got rid of that pesky &lt;code&gt;baseline&lt;&#x2F;code&gt; feature flag from our system. While that could be done, I actually decided to keep it around, still only setting it for the &lt;code&gt;baseline&lt;&#x2F;code&gt; test.
Keeping this around no longer serves any purpose to enabling correct imports, so what gives? Consider the following baseline code:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#C6D0F5, #CDD6F4); background-color: light-dark(#303446, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; StructWithMethods&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; StructWithMethods&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;  pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; moves_to_trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; i64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt;    todo!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;What if we want to write a witness-dependent lint to check for the case where this method, &lt;code&gt;moves_to_trait&lt;&#x2F;code&gt; changes parameter types? We could just check for all diffs on
&lt;code&gt;inherent_impl&lt;&#x2F;code&gt;s, which are implementations with no trait involved, and try to find functions with the same name, but different signatures, then generate a witness based
on the parameter types present. At surface level, this looks like it would work fine, right? However, consider the following change to the above code:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#C6D0F5, #CDD6F4); background-color: light-dark(#303446, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; StructWithMethods&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; TraitWithMethods&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;  fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; moves_to_trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; Into&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;i64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; TraitWithMethods&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; StructWithMethods&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;  fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt; moves_to_trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA999C, #EBA0AC);&quot;&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#81C8BE, #94E2D5);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt; impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E5C890, #F9E2AF);font-style: italic;&quot;&gt; Into&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CA9EE6, #CBA6F7);&quot;&gt;i64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#99D1DB, #89DCEB);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#8CAAEE, #89B4FA);font-style: italic;&quot;&gt;    todo!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#949CBB, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Is this a breaking change? Yes, technically, since the above code moves the earlier method to a new trait, code calling &lt;code&gt;moves_to_trait&lt;&#x2F;code&gt; would break since they don&#x27;t import
the trait which now contains that method. However, specifically, is it a breaking change for method parameter type changes? &lt;strong&gt;No&lt;&#x2F;strong&gt;, because we&#x27;re simply changing the explicit
&lt;code&gt;i64&lt;&#x2F;code&gt; parameter to any type which implements &lt;code&gt;Into&amp;lt;i64&amp;gt;&lt;&#x2F;code&gt;, which is the same non-breaking change we explored earlier. However, we want to be able to test if this is actually
a breaking change, since we could have changed it to anything else, for instance an &lt;code&gt;i32&lt;&#x2F;code&gt;, which &lt;em&gt;would&lt;&#x2F;em&gt; be a breaking change. If we just use the earlier described matching
scheme, however, which only checks the &lt;code&gt;inherent_impl&lt;&#x2F;code&gt;, we would entirely miss this case, and not end up checking it. So, instead, we need to check for all &lt;code&gt;impl&lt;&#x2F;code&gt;s, which
includes everything implemented from our trait. However, now, if our template is redesigned to simply import any relevant trait, then on the &lt;code&gt;baseline&lt;&#x2F;code&gt;, the witness will fail
to compile, because it will try to import a trait that &lt;em&gt;does not exist yet&lt;&#x2F;em&gt;. How can we remedy this? If only there was some way to conditionally import the new trait, but only
for the &lt;code&gt;current&lt;&#x2F;code&gt; version... which there is! If we leave the &lt;code&gt;baseline&lt;&#x2F;code&gt; flag in, we can conditionally disable importing the relevant traits by using
&lt;span class=&quot;no-wrap&quot;&gt;&lt;code&gt;#[cfg(not(features = &quot;baseline&quot;))]&lt;&#x2F;code&gt;&lt;&#x2F;span&gt;. Suddenly, we can now check to see if this is actually another breaking change, &lt;em&gt;on top of&lt;&#x2F;em&gt; the breaking
change caused by moving the method to a trait.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;minimal-diagnostics&quot;&gt;Minimal Diagnostics&lt;a class=&quot;zola-anchor&quot; href=&quot;#minimal-diagnostics&quot; aria-label=&quot;Anchor link for: minimal-diagnostics&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;The current way that witnesses are implemented, failures collect incredibly few diagnostics, covering just the bases of what is even needed to report the error at all to the
user. Why are they so incredibly minimal? The answer is, rather unsurprinsingly, time, and task priority. I simply did not find the time between the rest of the development
of the witness system to actually collect anything more than the bare minimum. Ideally this will be improved with time, following GSoC, it simply did not have time now
to be implemented.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;lint-logic&quot;&gt;Lint Logic&lt;a class=&quot;zola-anchor&quot; href=&quot;#lint-logic&quot; aria-label=&quot;Anchor link for: lint-logic&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Witness-dependent lints are generally expected to also have additional logic accompanying their runs, such as the process of extracting function or method parameters. As such,
a new field was added to the lint type, specifically called &lt;code&gt;lint_logic&lt;&#x2F;code&gt;&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#7&quot;&gt;7&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. As a default, it uses &lt;code&gt;LintLogic::UseStandard&lt;&#x2F;code&gt;, which defines non-dependent lints. Note that these
can still have witnesses, just for standard witness checking. Anything with a lint logic of &lt;code&gt;LintLogic::UseWitness&lt;&#x2F;code&gt;, however, is subject to witness-dependent linting, and so the
lint result depends on the result of running the witness. If witnesses are not run for the lint, either because they are not enabled for that run, or because the lint does not
contain a witness, then it will always be considered as non-breaking.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;witness-logic-rustdoc-parsing&quot;&gt;Witness Logic Rustdoc Parsing&lt;a class=&quot;zola-anchor&quot; href=&quot;#witness-logic-rustdoc-parsing&quot; aria-label=&quot;Anchor link for: witness-logic-rustdoc-parsing&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;As was mentioned earlier, witness-dependent lints, those marked with &lt;code&gt;lint_logic: LintLogic::UseWitness&lt;&#x2F;code&gt;, will do some heavier parsing to find values that
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;trustfall&#x2F;&quot;&gt;&lt;code&gt;trustfall&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; currently cannot find. The current two variations of this are &lt;code&gt;WitnessLogic::ExtractFuncArgs&lt;&#x2F;code&gt; and
&lt;code&gt;WitnessLogic::ExtractMethodArgs&lt;&#x2F;code&gt;, both of which are pretty self explanatory. The current system extracts these values by using &lt;code&gt;rustdoc_types&lt;&#x2F;code&gt; in order to search for matching
importable paths, and then to extract the appropriate values from the function or method. However, this is one of the biggest things holding us back from merging
witness-dependent linting into &lt;code&gt;main&lt;&#x2F;code&gt;, as it depends on a specific version of &lt;code&gt;rustdoc_types&lt;&#x2F;code&gt;, tying the system to a category of rust versions, those with the specific version
of rustdoc which is supported by this version of &lt;code&gt;rustdoc_types&lt;&#x2F;code&gt;. The goal, following the end of GSoC is to try and move to using the already imported &lt;code&gt;trustfall_rustdoc&lt;&#x2F;code&gt;, which
itself depends on &lt;code&gt;rustdoc_types&lt;&#x2F;code&gt;, but does so in a version-agnostic manner. More specifically, it has an adapter which operates on a versioned enum of the &lt;code&gt;rustdoc_types&lt;&#x2F;code&gt;
values, so being able to depend on this would greatly improve the versatility of the witness logic system.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;witness-result-collection&quot;&gt;Witness Result Collection&lt;a class=&quot;zola-anchor&quot; href=&quot;#witness-result-collection&quot; aria-label=&quot;Anchor link for: witness-result-collection&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Something that is rather of note is how the results from witness checking, both for standard and witness logic, is collected. Immediately, it&#x27;s visible that the witness system
returns a &lt;code&gt;WitnessReport&lt;&#x2F;code&gt;. However, this report only contains some surface level statistics, such as the number of successful and failed witnesses, the time elapsed for witness
checking, and if witness crate deletion experienced any errors. However, to actually access more specific details, we use a rather interesting system to conditionally attach
result values to lint results. Specifically, it was a struggle to figure out how to link witnesses to the lints they were running for, &lt;em&gt;especially&lt;&#x2F;em&gt; for witness-dependent lints,
where the success of the lint depends on the result of the witness checks. As a result, the original &lt;code&gt;LintResult&lt;&#x2F;code&gt; type which is used for reporting the original lints is given a
new field which holds &lt;code&gt;Option&amp;lt;WitnessCheckResult&amp;gt;&lt;&#x2F;code&gt;. This value is always set to &lt;code&gt;None&lt;&#x2F;code&gt; by default, but the &lt;code&gt;LintResult&lt;&#x2F;code&gt;s are passed by mutable reference to the witness system,
allowing for this field to be set by the witness system itself. This may frustrate some people, it honestly frustrates me too, I&#x27;m not a fan of the implicit modification of these
lint results by the witness system, but it was arguably the method that made the most sense for what we needed. Again, we need to be able to correlate the witness results to
a lint, specifically so we can determine the success of witness-dependent lints. However, in the case that witnesses are not run for a given lint, it also needs to be written
in a way where this is accounted for, which the modification of the optional field covers quite conveniently.&lt;&#x2F;p&gt;
&lt;p&gt;One way this could be re-written in the future would be to create a &lt;code&gt;PostWitnessResult&lt;&#x2F;code&gt;, which holds a &lt;code&gt;LintResult&lt;&#x2F;code&gt;, and an optional &lt;code&gt;WitnessCheckResult&lt;&#x2F;code&gt;. Then, so long as the
logic is modified to &lt;em&gt;always&lt;&#x2F;em&gt; construct and pass around &lt;code&gt;PostWitnessResult&lt;&#x2F;code&gt;s, we can easily allow for runs with witnesses disabled, and runs with witnesses enabled, and always
get the expected logic, without any weird, implicit mutations of the existing &lt;code&gt;LintResult&lt;&#x2F;code&gt;s.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;where-to-go-from-here&quot;&gt;Where To Go From Here?&lt;a class=&quot;zola-anchor&quot; href=&quot;#where-to-go-from-here&quot; aria-label=&quot;Anchor link for: where-to-go-from-here&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;The witness system is still, obviously a prototype, but massive swaths of the foundation have been laid. Primarily, the &lt;code&gt;rustdoc_types&lt;&#x2F;code&gt; dependency for witness logic is
arguably the largest roadblock to moving this forward. If we can find a way to make that work, it&#x27;ll be in a much better state already. Additionally, we ideally want to remove
and re-write bizarre bits of code, such as the &lt;a href=&quot;https:&#x2F;&#x2F;glitchlesscode.ca&#x2F;posts&#x2F;2025-11-05a&#x2F;#witness-result-collection&quot;&gt;current system to collect witness results&lt;&#x2F;a&gt;. Lastly, just adding more witnesses to as many lints as
possible will obviously bring it into a much more stable state, even if only by forcing us to re-write poorly written parts to accommodate the larger scale and presence of
witnesses.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;some-personal-thoughts&quot;&gt;Some Personal Thoughts&lt;a class=&quot;zola-anchor&quot; href=&quot;#some-personal-thoughts&quot; aria-label=&quot;Anchor link for: some-personal-thoughts&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;If you had asked me a week ago how I felt in terms of what I&#x27;d accomplished with this project, I would have been incredibly pessimistic. I would&#x27;ve told you that I was unhappy
with how much time I &lt;em&gt;didn&#x27;t&lt;&#x2F;em&gt; get to spend on it, for any reason. Over the writing of this final submission post, however, I&#x27;ve come to realize truly how much I&#x27;ve accomplished
over the past 23 weeks. I&#x27;m very proud of what I&#x27;ve created for &lt;span class=&quot;no-wrap&quot;&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;span&gt;, and
for the Rust community as a whole. I think that this is a feature that will truly make the experience when using this already fantastic tool just &lt;em&gt;that&lt;&#x2F;em&gt; much better. I hope
you, the reader will agree with me.&lt;&#x2F;p&gt;
&lt;p&gt;Additionally, I&#x27;m just incredibly happy with how much I&#x27;ve learned over this long journey. I&#x27;ve learned so much about this fantastic language, the code that I write in it,
and also just a ton about myself. Again, I won&#x27;t delve into details about my personal life, but through the struggles that blocked a lot of this development, I&#x27;ve learned
so much about myself, as well as other people. The biggest thing I&#x27;ve still been learning is how much of a struggle it can be to just ask for a helping hand, even if that&#x27;s
frankly what you need. I would not have been able to make this by myself, it just would not have happened.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;m incredibly proud of everything I&#x27;ve done here, and I&#x27;m so excited to continue work, both on this, and all future projects I may delve in to.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;acknowledgments-thanks&quot;&gt;Acknowledgments &amp;amp; Thanks&lt;a class=&quot;zola-anchor&quot; href=&quot;#acknowledgments-thanks&quot; aria-label=&quot;Anchor link for: acknowledgments-thanks&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Wrapping things up, I&#x27;d like the thank a few people and organizations for their incredible support over this project:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;You&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;d first like to thank you, the reader, for being interested in this project, and in my work. Whether you have just seen this for the very first time, or have been aware of its
existence over the past 23 weeks, you, taking time out of your day to come read about what I&#x27;ve made, means the absolute world to me.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The Rust Foundation&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;d like to thank the Rust Foundation for creating this fantastic language in which this project was created, and for fostering such an amazing community around it. I&#x27;d also like
to thank specifically Jakub Beránek, and anybody else who may have helped to organize the Rust Foundation&#x27;s participation in GSoC 2025, you are all amazing, and obviously, this
never would have happened without you.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Google Summer of Code&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;d like to thank the whole team over at Google in charge of the Google Summer of Code for creating such an interesting, and helpful opportunity, both for the organizations which
take part, and for contributors just like me who get involved in this fantastic program. I truly hope that this program will continue well into the future, and continue to provide
this great opportunity to bring new contributors into open source software development.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Predrag Gruevski&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Lastly, but most &lt;strong&gt;&lt;em&gt;certainly&lt;&#x2F;em&gt;&lt;&#x2F;strong&gt; not least, I&#x27;d like to thank my mentor, Predrag. You are so incredibly smart and insightful, yet also incredibly kind and understanding. Having you
continually pushing me forward towards success, no matter the case, has been an amazing experience, and I hope to continue working with you in the future. You were always there to
help when I found it in me to ask for it, and were always understanding with the many, many problems I experienced over the course of this program. Thank you, truly, it has been
an amazing experience to work with you.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;1&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;1&lt;&#x2F;sup&gt;
&lt;p&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;developers.google.com&#x2F;open-source&#x2F;gsoc&#x2F;help&#x2F;work-product&quot;&gt;https:&#x2F;&#x2F;developers.google.com&#x2F;open-source&#x2F;gsoc&#x2F;help&#x2F;work-product&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;2&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;2&lt;&#x2F;sup&gt;
&lt;p&gt;You can learn more about me &lt;a href=&quot;&#x2F;posts&#x2F;2025-05-08a&quot;&gt;here&lt;&#x2F;a&gt; and &lt;a href=&quot;&#x2F;about&quot;&gt;here&lt;&#x2F;a&gt;, and you can find most of my relevant digital accounts by looking
for &lt;code&gt;GlitchlessCode&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;3&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;3&lt;&#x2F;sup&gt;
&lt;p&gt;The final result has not yet been merged into main. &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;pull&#x2F;1467&#x2F;&quot;&gt;This PR&lt;&#x2F;a&gt; for example, is being
merged into &lt;span class=&quot;no-wrap&quot;&gt;&lt;code&gt;feat&#x2F;witness-based-linting&lt;&#x2F;code&gt;&lt;&#x2F;span&gt;, rather than &lt;code&gt;main&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;4&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;4&lt;&#x2F;sup&gt;
&lt;p&gt;This is currently carried out just using direct operation on &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;rustdoc_types&#x2F;&quot;&gt;&lt;code&gt;rustdoc-types&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; values.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;5&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;5&lt;&#x2F;sup&gt;
&lt;p&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Birthday_problem&quot;&gt;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Birthday_problem&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;6&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;6&lt;&#x2F;sup&gt;
&lt;p&gt;Take a look &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;blob&#x2F;33875af2e242a1b474379c630ac356add9209ae3&#x2F;src&#x2F;query.rs#L304&quot;&gt;at these the arguments field&lt;&#x2F;a&gt;
on the struct for witness queries for more.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;7&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;7&lt;&#x2F;sup&gt;
&lt;p&gt;&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;blob&#x2F;2e1ad2d2c4f7316d6bd6bb058196763b0a558097&#x2F;src&#x2F;query.rs#L160&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;blob&#x2F;2e1ad2d2c4f7316d6bd6bb058196763b0a558097&#x2F;src&#x2F;query.rs#L160&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;style&gt;
.footnote-reference a:not(:hover) {
  border-bottom: none;
}

.subtle {
  display: inline-block;
  opacity: 0.7;
  font-size: small;
  vertical-align: text-top;
}

.indent {
  padding-left: 0.5rem;
  border-left: 1.5px var(--text-decoration-color) solid;
}

.no-wrap {
  display: inline-block;
}
&lt;&#x2F;style&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<title>A Rough Start - GSoC 2025</title>
		<published>2025-07-15T00:00:00+00:00</published>
		<updated>2025-07-16T00:00:00+00:00</updated>
		<link rel="alternate" type="text/html" href="https://glitchlesscode.ca/posts/2025-07-15a/"/>
		<id>https://glitchlesscode.ca/posts/2025-07-15a/</id>
    
		<content type="html" xml:base="https://glitchlesscode.ca/posts/2025-07-15a/">&lt;p&gt;So... midterms, huh? I guess that&#x27;s where we&#x27;re at, here in the wonderful world of the Google Summer of Code! For anybody on a 12
week project like mine, this is our halfway point, where we evalutate our mentors, and our mentors evaluate us. In my opinion, this
is also a great point to take a good step back and evaluate ourselves, get good look at what has gone great... and what hasn&#x27;t.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;a-quick-review&quot;&gt;A quick review&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-quick-review&quot; aria-label=&quot;Anchor link for: a-quick-review&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;I&#x27;m working on adding &lt;strong&gt;Witness Program generation&lt;&#x2F;strong&gt; to &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. If
this is news to you, which, let&#x27;s be honest, it probably is, you can read a little more about it &lt;a href=&quot;&#x2F;posts&#x2F;2025-05-30a&quot;&gt;in my first blog post&lt;&#x2F;a&gt;
which I wrote (&lt;em&gt;checks calendar&lt;&#x2F;em&gt;) 6 weeks ago?! So, turns out writing a blog post every 3 weeks was more ambitious of a plan than what I
was ready to deal with... I&#x27;ll still aim to give another blog post in about 3 weeks time, but we&#x27;ll see if that one fares any better than
the previously planned 3 week update. &lt;strong&gt;&lt;em&gt;Anyways&lt;&#x2F;em&gt;&lt;&#x2F;strong&gt;, back on to the topic at hand, just to provide an even short review for those who don&#x27;t
want to go read another, incredibly short blog post, here we go:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt; is a tool used to check developing version of crates against older (baseline) versions of themselves, in order to
ensure that semantic versioning is not violated. This is incredibly important to ensuring that downstream crates can safely update their
dependencies without introducing a whole host of issues. This whole concept, while definitely complicated, is already implemented, and
continues to improve with each and every lint that is added in every new release (you can read about some really interestingly annoying
problems with &lt;code&gt;#[target-feature]&lt;&#x2F;code&gt; and the lints introduced to deal with it &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;predr.ag&#x2F;blog&#x2F;unsoundness-and-accidental-features-in-target-feature&#x2F;&quot;&gt;in Predrag&#x27;s blog here!&lt;&#x2F;a&gt;).
The problem here is that all these lints assume that every lint is perfect, as are all the underlying systems. Witness program generation
is an aide to catch problems with these lints and underlying systems, by automatically generating crates that &lt;em&gt;test the expected downstream
semver failures&lt;&#x2F;em&gt;, resulting in an error if no semver violation is found by attempting to compile the downstream code that is emitted by
the witness generation system.&lt;&#x2F;p&gt;
&lt;p&gt;The overall plan was to first create just a small system that could generate witness crates, and then work from there, adding automated
testing, error reporting, and then just adding this capability for every lint, since it must be manually added. Now, at the point of the
midterm, where are we? Well, obviously not there, that&#x27;s the end goal for the whole of this GSoC period. However, we are also obviously
not even at the halfway point, the system can&#x27;t even fully generate witness crates yet. Why not? Well, my dear reader (ew, I hated writing that)
read on, and you&#x27;ll surely find out more.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;things-are-going-kinda-slow&quot;&gt;Things are going kinda slow...&lt;a class=&quot;zola-anchor&quot; href=&quot;#things-are-going-kinda-slow&quot; aria-label=&quot;Anchor link for: things-are-going-kinda-slow&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Lets start with just the code, because &lt;a href=&quot;https:&#x2F;&#x2F;glitchlesscode.ca&#x2F;posts&#x2F;2025-07-15a&#x2F;#life-doesn-t-play-fair&quot;&gt;everything else deserves its own header&lt;&#x2F;a&gt;. Where are we now? What went
well? What definitely &lt;em&gt;did not&lt;&#x2F;em&gt;? Well firstly, as a couple quick statistics, I&#x27;ve only managed to get in &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;pulls?q=is%3Apr+author%3AGlitchlessCode+is%3Aclosed&quot;&gt;5 PRs&lt;&#x2F;a&gt;
including &lt;strong&gt;22 commits&lt;&#x2F;strong&gt;, with &lt;strong&gt;585 LOC added&lt;&#x2F;strong&gt; and &lt;strong&gt;164 LOC removed&lt;&#x2F;strong&gt; since the start of June. Am I happy with those numbers? Not really, I&#x27;d
much rather be deeper in than I am. But as a quick review, here&#x27;s what I&#x27;ve gotten done over those 5 PRs:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Added an unstable flag to the CLI so people could mess with witness generation if they want (feel free to do so! It doesn&#x27;t do much yet, but be my guest)&lt;&#x2F;li&gt;
&lt;li&gt;Added the ability for &lt;code&gt;InheritedValues&lt;&#x2F;code&gt;s to be inherited. This is important, I promise (no seriously)&lt;&#x2F;li&gt;
&lt;li&gt;Added a system to run witness queries and generate the program text for a witness (though it doesn&#x27;t do anything with it yet)&lt;&#x2F;li&gt;
&lt;li&gt;Update a single &lt;code&gt;BTreeMap&lt;&#x2F;code&gt; key from using a &lt;code&gt;String&lt;&#x2F;code&gt; to using an &lt;code&gt;Arc&amp;lt;str&amp;gt;&lt;&#x2F;code&gt; (That&#x27;s... literally it...)&lt;&#x2F;li&gt;
&lt;li&gt;Refactored an entire system integral to the entire system for generating the Rustdoc used in literally every single run of &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Other than that last one, it&#x27;s frankly not much. So, why did I even need to do that last PR, considering it&#x27;s refactoring a system that my
witness system theoretically shouldn&#x27;t even ever have to touch? Because, as it turns out, theory only works well in theory. As you should
now understand, these &lt;strong&gt;witness programs&lt;&#x2F;strong&gt; or &lt;strong&gt;witness crates&lt;&#x2F;strong&gt; that we want to end up generating need to be fully functional crates.
This is so that we can attempt to compile them using Cargo, so we can prove that breakage did, or did not occur &lt;em&gt;experimentally&lt;&#x2F;em&gt; rather
than simply analytically, like how the rest of &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt; functions. This means, to generate a witness crate, we need to know
where both the &lt;strong&gt;baseline&lt;&#x2F;strong&gt; and &lt;strong&gt;current&lt;&#x2F;strong&gt; versions of a crate exist, whether that is in the form of two separate directories on a computer,
as different git revisions in a git repository, or as a release on &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&quot;&gt;&lt;code&gt;crates.io&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, so that the witness crate can depend on
it for compilation. This information is obviously known by &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt; at some point in the checking process, otherwise it would
never be able to process crates from these sources, which it most definitely &lt;strong&gt;&lt;em&gt;can&lt;&#x2F;em&gt;&lt;&#x2F;strong&gt;. So what, big problem, just pull out that information,
send it to the witness system, move on, right? &lt;strong&gt;&lt;em&gt;Nope!&lt;&#x2F;em&gt;&lt;&#x2F;strong&gt; Instead, I got to discover the joys of &lt;code&gt;rustdoc_gen.rs&lt;&#x2F;code&gt; in &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;,
which is now my least favourite file in this whole system. More specifically, there is a data type (called &lt;code&gt;CrateDataRequest&lt;&#x2F;code&gt;) present within
&lt;code&gt;rustdoc_gen.rs&lt;&#x2F;code&gt; which contains all of this incredibly useful information, including even more useful information (such as enabled features)
which my witness system would also end up needing to know. Unfortunately, &lt;code&gt;CrateDataRequest&lt;&#x2F;code&gt; was generated exclusively inside of &lt;code&gt;rustdoc_gen.rs&lt;&#x2F;code&gt;,
as well as solely consumed within &lt;code&gt;rustdoc_gen.rs&lt;&#x2F;code&gt;, and as a sum total, was a data type that was exclusive to &lt;code&gt;rustdoc_gen.rs&lt;&#x2F;code&gt;. This data, which
my system very much needs to work, was kept entirely local to this one data flow in this one single file. The ideal route should be fairly obvious
from there, take the function which generates a &lt;code&gt;CrateDataRequest&lt;&#x2F;code&gt; and then immediately consumes it, and split it up into two public function calls,
with the first returning the &lt;code&gt;CrateDataRequest&lt;&#x2F;code&gt;, and the second consuming it. This would allow the witness system to consume the data as well, as
it raises the data up to the same level as where the witness system is being called from.&lt;&#x2F;p&gt;
&lt;p&gt;As you could probably guess from my above wording, however, it was &lt;em&gt;not&lt;&#x2F;em&gt; in fact that easy. I&#x27;m not going to subject you to the full experience
of trying to refactor this system, but lets just say it involved converting a dynamically allocated trait type to a weird cross between a generic-based
state machine and an enum. If you feel like trying to make some sense of it, try having a look at the &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&#x2F;pull&#x2F;1354&quot;&gt;absolute nonsense&lt;&#x2F;a&gt;
that went on in my PR to get this done. I hope you enjoy (&lt;em&gt;she says with dripping sarcasm&lt;&#x2F;em&gt;)!&lt;&#x2F;p&gt;
&lt;p&gt;Basically, what I&#x27;m getting at here is, no matter how well you try to plan and assess timelines for certain parts of your project, they will&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Never take the amount of time you think they will,&lt;&#x2F;li&gt;
&lt;li&gt;Almost always take longer than you expect, and&lt;&#x2F;li&gt;
&lt;li&gt;Usually end up revealing something much bigger that you have to do.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Lesson learned, I guess...&lt;&#x2F;p&gt;
&lt;h1 id=&quot;life-doesn-t-play-fair&quot;&gt;Life doesn&#x27;t play fair&lt;a class=&quot;zola-anchor&quot; href=&quot;#life-doesn-t-play-fair&quot; aria-label=&quot;Anchor link for: life-doesn-t-play-fair&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;&quot;Okay, fair enough, a big refactor takes some time&quot;, I assume probably nobody is saying, &quot;but that still doesn&#x27;t explain how far behind you are Talyn&quot;
(At this point is this just me putting my mental words and doubts into the metaphorical mouths of other people? yeah...). But &quot;you&quot; are correct, I
should probably explain that, shouldn&#x27;t I... Sadly for you I don&#x27;t feel like spilling every corner of my life over to the internet, just most of the
them (I&#x27;m not Brennan Lee Mulligan, you can have those 5 points, I don&#x27;t want them). Let&#x27;s just say that, just as your projects will probably almost
never go as planned thanks to problems with the project itself, life has a way of &lt;em&gt;making things interesting&lt;&#x2F;em&gt;, and getting in the way. Major problems
keeping schedules? Yeah I got it. How about some mental health problems right at the start of GSoC? Yup, got that one too! How about a trip to the
hospital in an amulance? Yup, I even got that one... See what I mean? I&#x27;m really just filling out my bingo sheet here, except I feel like this isn&#x27;t
one you &lt;em&gt;want&lt;&#x2F;em&gt; to win...&lt;&#x2F;p&gt;
&lt;p&gt;One could argue that some of these are just excuses for not wanting to work on the project. I&#x27;d probably reply to kindly leave me alone and go away
(arguably, with much more flavourful language, I&#x27;m just keeping it... &lt;em&gt;polite&lt;&#x2F;em&gt; here), because frankly, I really do want to work on &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;.
Working on this project, solving the problems I come across, even if a little infurating (See the refactor above), and helping to develop both my
skills as a developer and this amazing tool itself is honestly some of the most fun I&#x27;ve had in a while. Is it work? Sure, but it&#x27;s a hell of a lot
more fun than, say, working at a grocery store over the summer. If you want to believe that I&#x27;m procrastinating from doing this, be my guest, just
don&#x27;t expect me to agree. Writing code is just another job, except I have a lot more fun doing this one. However, all jobs are byproduct of life, and
unforunately, &lt;strong&gt;life doesn&#x27;t play fair&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;why-didn-t-i-see-that-coming&quot;&gt;Why didn&#x27;t I see that coming?&lt;a class=&quot;zola-anchor&quot; href=&quot;#why-didn-t-i-see-that-coming&quot; aria-label=&quot;Anchor link for: why-didn-t-i-see-that-coming&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;I have no idea. Naivety? Maybe a bit. Though, frankly, I did kinda see this coming, I just didn&#x27;t do anything to prepare for it. &lt;strong&gt;If there&#x27;s one thing
I hope you, the reader, get from this blog, it&#x27;s to expect the unexpected&lt;&#x2F;strong&gt;. It&#x27;ll happen, whether you&#x27;re participating in GSoC this year, or in the future,
whether you&#x27;re working a senior engineer position or an entry level job at a grocery store, or just not even working at all (Haha I love the modern job
market so much). Expect that the unexpected will happen. Don&#x27;t try to make a plan for every possible outcome, I promise it won&#x27;t work. Just try to be ready
to roll with it. It&#x27;ll feel overwhelming, upsetting, frustrating, and annoying. You&#x27;ll fall behind schedule. But just keep on going. That&#x27;s what I&#x27;m doing.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;so-what-now&quot;&gt;So what now?&lt;a class=&quot;zola-anchor&quot; href=&quot;#so-what-now&quot; aria-label=&quot;Anchor link for: so-what-now&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Following midterms (and frankly, throughout midterms too) I plan to keep working at it all. Am I behind my schedule? Absolutely! Does it bug me? For sure,
I hate it! But really the best thing I can do is just to keep working at it. From here, I&#x27;m well in progress for the system to just generate the basic
witness crates (only locally in my codebase so far though). From there, I&#x27;ll just keep going for each goal, one after another. First the crates, then the
testing, then error reporting, and so on. I&#x27;m absolutely excited to still be here working at it, and I&#x27;m ready to see where it&#x27;ll end up.&lt;&#x2F;p&gt;
&lt;p&gt;Before I go, however, I&#x27;d like to thank my GSoC mentor, Predrag Gruevski.&lt;&#x2F;p&gt;
&lt;p&gt;As a word to everybody else about Predrag, he&#x27;s incredibly supportive, smart, and available to help me. Having him as my mentor has made me truly invested
in accomplishing this project, because the development environment he has created is so friendly, helpful, and supportive, even when I was going through
some rough times in real life.&lt;&#x2F;p&gt;
&lt;p&gt;Speaking directly to Predrag, assuming you read this post: Thank you. You truly understand how to be a caring, supportive, and understanding mentor. In spite of
time zone differences, physical distance, and the limits of digital communication, you&#x27;re basically always available to answer questions, to hear my updates,
and to review my code.&lt;&#x2F;p&gt;
&lt;p&gt;I really appreciate it.&lt;&#x2F;p&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<title>Making SemVer Breakage Obvious – GSoC 2025</title>
		<published>2025-05-30T00:00:00+00:00</published>
		<updated>2025-05-31T00:00:00+00:00</updated>
		<link rel="alternate" type="text/html" href="https://glitchlesscode.ca/posts/2025-05-30a/"/>
		<id>https://glitchlesscode.ca/posts/2025-05-30a/</id>
    
		<content type="html" xml:base="https://glitchlesscode.ca/posts/2025-05-30a/">&lt;p&gt;Oh, uh... hi! Didn&#x27;t expect anybody to actually come read this... huh&lt;&#x2F;p&gt;
&lt;p&gt;I guess I should &lt;a href=&quot;&#x2F;posts&#x2F;2025-05-08a&#x2F;&quot;&gt;introduce myself&lt;&#x2F;a&gt; real quick. I&#x27;m Talyn, a first year undergraduate comp-sci student, rust
enthusiast and long time programmer. More relevantly, I&#x27;m also one of the
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;summerofcode.withgoogle.com&#x2F;programs&#x2F;2025&#x2F;projects&#x2F;MMRSG9WU&quot;&gt;Google Summer of Code&lt;&#x2F;a&gt; contributors with the Rust Foundation
for GSoC 2025! More specifically, I&#x27;ll be working on adding automatic witness program generation to
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; over this summer. I&#x27;m very excited to be here as a part
of GSoC this year, and I&#x27;m very optimistic for how it&#x27;ll go. I decided to make this little blog post to give a very short overview
of my plans and project, and just to introduce myself to the community!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;so-what-is-a-witness-program&quot;&gt;So what &lt;em&gt;is&lt;&#x2F;em&gt; a witness program?&lt;a class=&quot;zola-anchor&quot; href=&quot;#so-what-is-a-witness-program&quot; aria-label=&quot;Anchor link for: so-what-is-a-witness-program&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;First off, if you aren&#x27;t familiar with what &lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;semver.org&#x2F;&quot;&gt;semver&lt;&#x2F;a&gt; is, or what
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;obi1kenobi&#x2F;cargo-semver-checks&quot;&gt;&lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; is, I recommend doing at least little reading before
diving in. Alright, so what is a witness program? In simple terms, a witness program in this context means any valid, compilable
Rust program that functions on a prior version of your crate, but fails to compile on the new version due to whatever breaking change
was added. Sounds fairly simple, right? For example, if your crate used to export a struct, but then made that private, a witness
program could just be a program that tries to import the struct, thus failing to compile on the new version. The complicated part
here is making these witnesses &lt;em&gt;automatically&lt;&#x2F;em&gt;, no matter the crate we&#x27;re testing.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;how-i-plan-to-implement-that-whole-thing-i-just-described&quot;&gt;How I plan to implement that whole thing I just described&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-i-plan-to-implement-that-whole-thing-i-just-described&quot; aria-label=&quot;Anchor link for: how-i-plan-to-implement-that-whole-thing-i-just-described&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Going based off my original proposal, and a little plan layout from Predrag Gruevski (my mentor), my plan for this summer will
probably look something a bit like this:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Adding the actual basic witness generation system. Yes, that&#x27;s a bit of a &quot;draw the rest of the owl&quot;, but admittedly, the existing
systems in &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt; should actually make this &lt;em&gt;somewhat&lt;&#x2F;em&gt; trivial to implement. We just won&#x27;t have any actual witnesses
implemented for each lint, just the capability to theoretically do so.&lt;&#x2F;li&gt;
&lt;li&gt;Once we have the actual system that creates these witness, I&#x27;ll need at least one or two simple witnesses just to work with, which
should be hopefully be quite reasonable to implement.&lt;&#x2F;li&gt;
&lt;li&gt;Here&#x27;s where it actually gets interesting. I&#x27;m not only going to be making a system that generates witnesses, but automatically
tests them as well. That means importing both versions of the crate in question, and then getting the rust compiler to try and
compile them. We should expect to see that the baseline compiles successfully, and the new version does not. Then, we can visibly
show the user &quot;See! It breaks, right there, just like that!&quot;. But what if that&#x27;s not what we see? What if both version compile
successfully? While this obviously means we can&#x27;t report all that much to the user about their code, it&#x27;s still quite useful to us,
because it means we&#x27;ve got a bug somewhere!&lt;&#x2F;li&gt;
&lt;li&gt;That&#x27;s where this stage comes in: &lt;em&gt;diagnostics collection&lt;&#x2F;em&gt;. More specifically, in the event that a generated witness doesn&#x27;t create
the expected behaviour during compilation, that means that &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt; should collect as much data about that lint as
possible, and pack it up for you (the user) to hopefully submit as an issue! This should ideally help us make a better, more
consistent &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt; experience, by allowing the capture of most false-positives.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;So that&#x27;s a lot... but also surprisingly feasible, and I&#x27;m very excited to get started!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;why-i-think-you-should-care&quot;&gt;Why I think you should care&lt;a class=&quot;zola-anchor&quot; href=&quot;#why-i-think-you-should-care&quot; aria-label=&quot;Anchor link for: why-i-think-you-should-care&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Libraries are everywhere, external crates are an fairly integral part of the Rust ecosystem, and maintaining the contract promised by
semantic versioning is important to avoid unintended breakages for crate users. I think that having tools like &lt;code&gt;cargo-semver-checks&lt;&#x2F;code&gt;
available for anybody and everybody to use is a great way to help uphold that contract, because while we like to think we won&#x27;t
accidentally add a breaking change when we don&#x27;t want to,
&lt;a rel=&quot;noopener nofollow noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;predr.ag&#x2F;blog&#x2F;semver-violations-are-common-better-tooling-is-the-answer&#x2F;#tl-dr-table-of-contents&quot;&gt;it happens surprisingly often&lt;&#x2F;a&gt;.
That&#x27;s a problem for pretty much everyone, and so if nothing, I&#x27;m hoping this summer to help improve the ease of avoiding semver
violations, making for a better, more reliable and safe experience for everyone!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;so-what-now&quot;&gt;So what now?&lt;a class=&quot;zola-anchor&quot; href=&quot;#so-what-now&quot; aria-label=&quot;Anchor link for: so-what-now&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Well, unfortunately, due to some &lt;em&gt;personal issues&lt;&#x2F;em&gt; I&#x27;ve had a bit of a bumpy start to Google Summer of Code, but hopefully it
should start going a bit more smoothly from now on. Unfortunately, that does mean I don&#x27;t have much to report on so far, but I&#x27;m
planning to make more of these blogs as the summer goes on, so keep an eye for those!&lt;&#x2F;p&gt;
&lt;p&gt;In general though, it has been really good to meet some of the other GSoC contributors and mentors, and I&#x27;m extremely honoured to be
here, as a part of it all. I hope if you read to the end of this little blog, that you enjoyed it! I will admit, my blog may be a
little less &quot;professional&quot; than you might expect, but I really don&#x27;t want to be some mysterious voice on the other side of your screen.
After all, I&#x27;m just another person and I want to show that! So again, thanks for reading!&lt;&#x2F;p&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<title>An Introduction</title>
		<published>2025-05-08T00:00:00+00:00</published>
		<updated>2025-05-09T00:00:00+00:00</updated>
		<link rel="alternate" type="text/html" href="https://glitchlesscode.ca/posts/2025-05-08a/"/>
		<id>https://glitchlesscode.ca/posts/2025-05-08a/</id>
    
		<content type="html" xml:base="https://glitchlesscode.ca/posts/2025-05-08a/">&lt;h1 id=&quot;welcome&quot;&gt;Welcome&lt;a class=&quot;zola-anchor&quot; href=&quot;#welcome&quot; aria-label=&quot;Anchor link for: welcome&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Welcome to my blog, whatever I may end up putting here. Wow, that sounds really boring, doesn&#x27;t it? Most of these blogs
(especially the more personal ones) are not going to be written particularly professionally, this is just my space for
jotting my thoughts, I hope you enjoy.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;who-i-am-i&quot;&gt;Who I am I?&lt;a class=&quot;zola-anchor&quot; href=&quot;#who-i-am-i&quot; aria-label=&quot;Anchor link for: who-i-am-i&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;First off, go read my &lt;a href=&quot;&#x2F;about&quot;&gt;about page&lt;&#x2F;a&gt;, that&#x27;ll have some good, and more importantly up-to-date information about me
for you. But if you really want to know some more information about me, here you go, though keep in mind that all that I
put here is only relevant to the time of writing this.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;m Talyn, a 19 year old first year comp-sci undergraduate student. I&#x27;ve been programming a lot longer than I&#x27;ve been in
university though, I was first experimenting with an Arduino in Grade 5, almost 10 years ago now. Admittedly, I didn&#x27;t
program all that much throughout junior high school (grades 7-9), although I did still make some projects. Mostly, I was
busy dealing with a &lt;em&gt;tiny little global pandemic&lt;&#x2F;em&gt; that forced me out of my classroom for grades 8 and 9 (crazy right?).&lt;&#x2F;p&gt;
&lt;p&gt;In high school, however, I started doing computer science as an actual class, and as per the teacher&#x27;s directive,
learned &lt;strong&gt;HTML, CSS, and JavaScript&lt;&#x2F;strong&gt; for three years straight. That&#x27;s really where my abilities started to skyrocket,
as I obviously already had a decent jumping-off point, but from there I really just had a great opportunity to learn
more.&lt;&#x2F;p&gt;
&lt;p&gt;In eleventh grade, we were supposed to learn a bit of &lt;strong&gt;python&lt;&#x2F;strong&gt;, and pick a third language to learn in twelfth grade.
Although we were encouraged to learn &quot;easier&quot; languages such as &lt;strong&gt;C#&lt;&#x2F;strong&gt; and the likes, I asked to personally learn
&lt;strong&gt;Rust&lt;&#x2F;strong&gt;, which my teacher allowed me to do. Honestly, stupid idea, but the best choice I made at the same time. Since
then, I&#x27;ve learned a lot, become a much better programmer, and truly learned to love this amazing language. Do I think
that &lt;em&gt;everything&lt;&#x2F;em&gt; should be (re)written in Rust? No, some tasks are really just not suited for Rust, but it still is a
very impressively versatile language.&lt;&#x2F;p&gt;
&lt;p&gt;Now, at the end of my last year of high school, I ran into a slight... &lt;em&gt;hiccup&lt;&#x2F;em&gt;, if you can call it that. More
specifically, I figured out, after a long year or more of questioning, that I was transgender. Okay yes, I&#x27;m a comp sci
trans-girl who likes Rust, so sue me. While that might not serve as much of a &lt;em&gt;literal&lt;&#x2F;em&gt; roadblock, I think most of you
reading this can imagine that dealing with that mentally and socially (and sometimes even physically) is not easy or
simple.&lt;&#x2F;p&gt;
&lt;p&gt;That&#x27;s also why if you try to find any of the projects I&#x27;ve worked on or competitions I&#x27;ve participated in, you won&#x27;t
find much. Everything from before is linked to my deadname, so I&#x27;ve been trying to bury it well, and I&#x27;ll bury them
harder as time goes on.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;so-what-now&quot;&gt;So what now?&lt;a class=&quot;zola-anchor&quot; href=&quot;#so-what-now&quot; aria-label=&quot;Anchor link for: so-what-now&quot; style=&quot;visibility: hidden;&quot;&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Well, that&#x27;s a good question. Really, my life is only just starting, not just because I&#x27;m only recently an adult, but up
to this point in my life, I&#x27;ve mostly just been drifting. I&#x27;m only just starting to actually actually become a person,
and to define who I am to me, and to the world. I&#x27;m going to keep going through my transition, I&#x27;m going to keep going
through my education, and I&#x27;m going to keep learning more about who I am. Currently, the biggest thing I&#x27;m looking
forward to is participating in Google Summer of Code this summer. Look forward to more blog posts about that, I&#x27;m
planning on it.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;To anybody who&#x27;s checking this out, thank you, I&#x27;m glad you could be here.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
</content>
	</entry>
</feed>
