Skip to content

Conversation

@tritchey
Copy link
Contributor

The concurrency checking doesn't like the validationProvider in TokenSystemValidator. After fixing the concurrency complaint, it looks like the tokenValidator isn't being strongly held any more, so a new tokenValidator property was added to TextSystemStyler.

@mattmassicotte
Copy link
Contributor

Wow this is an interesting find! This project has a tendency to turn up compiler bugs - I have found many while working on it. In this case, it looks like a regression in 6.2, though possibly also 6.1, unsure exactly.

I've been looking more closely, as making this return value weak is a fairly significant semantic change. I discovered a more-minimally-invasive change that seems to also work. What do you think?

An explicit, non-weak self capture in the second argument:

	var validationProvider: HybridSyncAsyncValueProvider<Validator.ContentRange, Validation, Never> {
		.init(
			syncValue: { self.validate($0) },
			asyncValue: { [self] _, range in await self.validate(range) }
		)
	}

@tritchey
Copy link
Contributor Author

Hi Matt,
Oh, yeah - I'm brand-new looking at the code base so wasn't sure what the implications might be. I tested you version an it is working great, so a much more straightforward fix.

@mattmassicotte
Copy link
Contributor

I think this is just CI being poorly configured. I'll have a look that.

Thanks so much for taking the time to let me know about this and fix it. I really appreciate it!

@mattmassicotte mattmassicotte merged commit f159801 into ChimeHQ:main Aug 18, 2025
0 of 6 checks passed
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