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

Upgrade to core.async 1.6.673 #231

Merged
merged 2 commits into from
May 12, 2023

Conversation

tanzoniteblack
Copy link
Contributor

Some of the functions that we were relying on to hijack the go state machine compilation changed namespaces. This updates the code to reference where they now live.

Addresses #229

@tanzoniteblack tanzoniteblack requested a review from KingMob as a code owner April 5, 2023 16:24
Some of the functions that we were relying on to hijack the go state machine compilation changed namespaces. This updates the code to reference where they now live.

Addresses clj-commons#229
Copy link
Collaborator

@KingMob KingMob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that was fast!

Unfortunately, since not everyone uses core.async with manifold, it's declared scope :provided, which means they choose which version to bring. (And even without scope provided, users could always override the core.async dep.)

The solution needs to check both namespaces where the vars could be defined, and then use the one it finds.

@tanzoniteblack
Copy link
Contributor Author

Sorry for the slow response here, @KingMob . I've been thinking this over and I'm not sure that the complications of implementation make it worth supporting both. I think having a minimum version pinned as our provided scope, and warning in the release that if you upgrade to this version there's a particular minimum version you're expected to have of core.async. At least, my interpretation of provided dependencies has always been, "We tested with this particular version of the library. Caveat emptor if you choose to use a different version."

Let me know your thoughts?

@KingMob
Copy link
Collaborator

KingMob commented Apr 18, 2023

Hmmm. I guess my problem with "Caveat emptor if you choose to use a different version" is that usually means "We haven't tested with your version, and we can't predict what will happen". But in this case, we know it will break, and we know how to fix it. It feels like we're punting a problem to the user. OTOH, a quick Github search doesn't show anyone using it, so... ¯\_(ツ)_/¯

I think, to be safe, I'd still rather support both namespaces.

@tanzoniteblack
Copy link
Contributor Author

@KingMob , I've validated locally that the change I made works with both the current & older version of core.async, but I'm unsure the best way to set up circleci to actually test both

@KingMob
Copy link
Collaborator

KingMob commented May 11, 2023

Great work!

To test both, maybe add two extra profiles in project.clj? One :old-core-async and one :new-core-async with the right deps. Then run both like:

lein with-profiles +old-core-async test :only whatever.the.go-off-tests.namespace.is
lein with-profiles +new-core-async test :only whatever.the.go-off-tests.namespace.is

I think that would work

@tanzoniteblack tanzoniteblack force-pushed the ryan/core-async-1.6.673 branch from c1f53b4 to ef9038a Compare May 11, 2023 20:46
@tanzoniteblack
Copy link
Contributor Author

@KingMob , I added a new profile explicitly for the old core.async version and have the default deps list using the newer version, rather than adding profiles for both. Circleci config has also been updated to run the go-off tests. I've verified locally that the different profiles are correctly using the right core.async versions.

Copy link
Collaborator

@KingMob KingMob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KingMob
Copy link
Collaborator

KingMob commented May 12, 2023

Fixes #229

@KingMob KingMob merged commit 3963f75 into clj-commons:master May 12, 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.

2 participants