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

chore(deps): update dependency io.github.iltotore:iron to v2.6.0 #175

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 21, 2024

Mend Renovate

This PR contains the following updates:

Package Update Change
io.github.iltotore:iron minor 2.5.0 -> 2.6.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

Iltotore/iron (io.github.iltotore:iron)

v2.6.0

Compare Source

Introduction

This release adds new "all" variants introduced in 2.5.0 as well as compile-time UX enhancements.

Main changes

First-order variants for Cats and ZIO

iron-cats and iron-zio now include "all" variants for ValidatedNec/EitherNec/Nel... and Validation.

opaque type Username = String :| Alphanumeric
object Username extends RefinedTypeOps[String, Alphanumeric, Username]
//Success(List("CoolSkeleton95", "Alice"): List[String :| Alphanumeric])
List("CookSkeleton95", "Alice").refineAllValidation[Alphanumeric]

/*
Failure(NonEmptyChunk(
  InvalidValue("Il_totore", "Should be alphanumeric"),
  InvalidValue(" ", "Should be alphanumeric")
))
*/
List("Il_totore", "CoolSkeleton95", " ", "Alice").refineAllValidation[Alphanumeric]

//Success(List("CoolSkeleton95", "Alice"): List[Username])
Username.validationAll(List("CookSkeleton95", "Alice"))

(Scastie)

More useful compile-time errors

A reason is now given when an error fails at compile-time:

val y: Int = ??? //Runtime value
val x: Int :| Greater[10] = y
[error]    |-- Constraint Error --------------------------------------------------------
[error]    |Cannot refine value at compile-time because the predicate cannot be evaluated.
[error]    |This is likely because the condition or the input value isn't fully inlined.
[error]    |
[error]    |To test a constraint at runtime, use one of the `refine...` extension methods.
[error]    |
[error]    |Inlined input: y
[error]    |Inlined condition: (y.>(10.0): scala.Boolean)
[error]    |Message: Should be greater than 10
[error]    |Reason: Some arguments of `>` are not inlined:
[error]    |Arg 0:
[error]    |  Term not inlined: y
[error]    |----------------------------------------------------------------------------
Better colors for compile-time errors

Instead of aqua, compile-time errors use magenta which is more readable in Scastie than the former. Expressions are now highlighted:

Screenshot

image

Configurable compile-time errors

Compile-time errors can now be tweaked with two options:

  • -Diron.color to enable (true)/disable (false) compile-time messages colorations, including syntax highlighting
  • -Diron.shortMessages to display short summaries instead of full messages. Useful for Lens (such as Error Lens on VSCode or Inspection Lens on Intellij IDEA) users to have quick insights while coding.
Lens screenshot

In the following example, the flag -Diron.shortMessages=true was added to BSP arguments.

image

Adopters

The company Clever Cloud and the Tessela project are now listed on the README as adopters.

Contributors

Full Changelog: Iltotore/iron@v2.5.0...v2.6.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@cheleb cheleb merged commit 0a5b260 into master Jun 26, 2024
1 check passed
@renovate renovate bot deleted the renovate/io.github.iltotore-iron-2.x branch June 26, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant