Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUAC 5181 software maintenance #2

Closed
wants to merge 30 commits into from

Conversation

lj-dickey
Copy link

Rebase on the newest version of the snapshot library

stephencelis and others added 30 commits August 30, 2023 15:13
* Updated interface

Let's introduce a more streamlined version of `assertSnapshot` that
takes an `of` instead of a `matching` parameter:

```diff
-assertSnapshot(matching: value, as: .json)
+assertSnapshot(of: value, as: .json)
```

While `matching` read OK, it is also a little confusing, since it sounds
like the value itself is a snapshot, but the helper is really taking a
snapshot _of_ the value to be compared.

We'll keep the old version around for a long time as a soft deprecation,
but whenever we get close to realizing a 2.0 we can make a harder break.

* wip
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* beta 6

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* small things

* wip

* DocC + swift-format (pointfreeco#765)

* DocC and swift-format support

* wip

* wip

* wip

---------

Co-authored-by: Brandon Williams <[email protected]>
* Escape carriage returns explicitly

Either Xcode or SwiftSyntax is stripping the carriage return out of the
snapshot, but either way we should probably explicitly escape them for
visibility.

Fixes pointfreeco#771.

* simplify

* wip
* Update .spi.yml

Fix watchOS builds by selecting correct scheme

* Update .spi.yml
A MacroTesting bug report encountered an index crash:

pointfreeco/swift-macro-testing#6

Even when updating to `index(_:offsetBy:limitedBy:)`, the crash
remained, so I've resorted to more explicit limiting math. This seems to
fix the crash.
XCTest test cases can be configured with `continueAfterFailure = false`,
and in fact UI tests are configured with this by default, but in these
cases inline snapshots will never be written because the failure aborts
the test before we write to the snapshot state.

This commit reorders things to fix the problem.
…ntfreeco#788)

Right now we preserve the `()`, which leads to atypical Swift code,
like:

```swift
assertCustomInline() {
  """
  ...
  """
}
```
Making `assertInlineSnapshot` simply unavailable when another dependency
locks to 508.0.1. I think there are too many significant changes in
swift-syntax 509 to support the function in earlier versions.
* Add record mode to inline snapshots

* wip
pointfreeco#812)

* Improve the speed of comparing memory buffers by using a workaround to a missed compiler optimization

Co-authored-by: Eric Jensen <[email protected]>

* Update NSImage.swift

* Update UIImage.swift

* fix

---------

Co-authored-by: Eric Jensen <[email protected]>
Co-authored-by: Stephen Celis <[email protected]>
If recording, don't look for the reference image in the bundle, since
this sets the file name for generation later. Instead, look for a local
copy of the file (since we won't be recording tests in CI), so that's where
the new file gets generated.
@lj-dickey lj-dickey closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants