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

Bump encore and use non-deprecated encore fn #35

Closed
wants to merge 2 commits into from
Closed

Bump encore and use non-deprecated encore fn #35

wants to merge 2 commits into from

Conversation

philomates
Copy link

I have a project the uses nippy and tempura. In bumping nippy to the latest I now get the following failure (not sure why it isn't just a warning) due to tempura's usage of a deprecated encore function. I guess nippy accepts encore as low as 3.58.0 and it looks like 3.66.0 is the version that deprecates kw-identical?.
Regardless, I figured I'd bump it here so others don't need to do such git spelunking and version gymnastics.

------ ERROR -------------------------------------------------------------------
 File: jar:file:/home/runner/.m2/repository/com/taoensso/tempura/1.5.3/tempura-1.5.3.jar!/taoensso/tempura.cljc:44:33
--------------------------------------------------------------------------------
  41 |                 (enc/sb-append sb (str x1))
  42 |                 (enc/str-builder  (str x1))))))]
  43 | 
  44 |     (if (and (== (count out) 2) (enc/kw-identical? (nth out 0) :span))
---------------------------------------^----------------------------------------
null
taoensso.encore/kw-identical? is deprecated
{:warning :fn-deprecated, :line 44, :column 33, :msg "taoensso.encore/kw-identical? is deprecated", :shadow.build.compiler/warning-as-error true}
ExceptionInfo: taoensso.encore/kw-identical? is deprecated
	shadow.build.compiler/warning-collector (compiler.clj:631)

@philomates
Copy link
Author

actually nippy uses encore/latom, which was introduced in 3.67.0, so I'm not sure my version pinning to 3.66.0 workaround actually works. Also nippy uses multi-arity get-env which was introduced in encore 3.74.1. But pinning to 3.74.1 gives me

Execution error (ExceptionInfo) at taoensso.encore/assert-min-encore-version (encore.cljc:2137).
Insufficient `com.taoensso/encore` version, you may have a dependency conflict: see `https://www.taoensso.com/dependency-conflicts` for solutions.

(I looked at the link but it didn't help me get unstuck)

@yogthos yogthos requested a review from ptaoussanis June 4, 2024 14:32
@ptaoussanis
Copy link
Member

ptaoussanis commented Jun 4, 2024

@philomates Hi Philip, please don't try pin to an older version of Encore - that's never a good idea. You should always try use the newest version of Encore required by your dependencies.

It sounds like the practical issue here is that a deprecation warning is somehow triggering a Shadow build error. That's not expected, so I'd start by trying to get to the bottom of that. A deprecation warning shouldn't generally be fatal.

Is it possible there's something in your Shadow config to indicate that warnings should be fatal?

Edit to add: I'm happy to cut a new version of Tempura now if really necessary, but it'd be nice to know why this is necessary. Otherwise the usual plan would be to just update all dependencies as usual on the next release.

@ptaoussanis
Copy link
Member

Ah, looking closer at your posted excerpt I notice this:

:shadow.build.compiler/warning-as-error true

I suspect that may be the culprit

@philomates
Copy link
Author

we indeed have :warnings-as-errors true in the shadow config, and can probably unset that to continue. Thanks for the tip :)
Bumping on next release sounds fine, though it also looks like encore was last bumped in tempura 2 years ago

@ptaoussanis
Copy link
Member

Thanks for the tip :)

You're welcome, no problem. Apologies for any confusion.

we indeed have :warnings-as-errors true in the shadow config, and can probably unset that to continue.

Just let me know if that's somehow a problem for you (e.g. if there's a reason you prefer/need warnings as errors) and I'll cut a maintenance release sooner.

though it also looks like encore was last bumped in tempura 2 years ago

In general that shouldn't be a problem. Encore releases are always backwards compatible, so the only downside should be the warning. Tempura's been pretty stable - no new releases since Oct 2022.

@philomates
Copy link
Author

Thanks, I appreciate you taking the time to dig into this with me
We were able to do :warnings-as-errors {:ignore #{taoensso.*}} in our project's shadow config to get things rolling again.

@philomates philomates closed this Jun 4, 2024
@philomates philomates deleted the bump-encore branch June 4, 2024 14:50
@ptaoussanis
Copy link
Member

BTW in case it's helpful - I've just pushed https://github.com/taoensso/tempura/releases/tag/v1.5.4 which updates dependencies and cleans up the documentation a bit.

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.

2 participants