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

Incorrect Send implementation classification using complicated types #19318

Closed
jdm opened this issue Nov 25, 2014 · 5 comments
Closed

Incorrect Send implementation classification using complicated types #19318

jdm opened this issue Nov 25, 2014 · 5 comments

Comments

@jdm
Copy link
Contributor

jdm commented Nov 25, 2014

Sorry, not much concrete information here. Servo fails to build in confusing ways with small changes:

Build Servo, get a bunch of errors relating to Send bounds on types, some of which call out layout_interface::Msg in particular.

  • modify TestMsg to be the following: TestMsg(Sender<Sender<((), Receiver<()>)>>) (or get rid of the first tuple argument, or get rid of one level of Sender, etc.)

Build Servo again, see that it builds without any problems.

@nikomatsakis
Copy link
Contributor

Sorry for the delayed report. I tracked this down before thanksgiving but forgot to take notes. The problem is that we are hitting the maximum recursion depth counter for the builtin bounds. The simplest fix then is to up this depth -- the whole idea was that the depth would be configurable per crate. However, I'm not sure that it actually is.

I guess I would say there are three problems here:

  1. A clearer error report! Overflow is supposed to be clearly detected and "bubble up", but that got lost and it's now being kind of silently lumped into "failed to resolve". Bad.
  2. Configurable limits. This should be pretty easy to implement if it doesn't exist already.
  3. Recursion for builtin bounds doesn't technically need to increment the recursion counter in many cases; I considered this when implementing, but wasn't sure whether I wanted to take advantage of it, since it would make builtin bounds vary more than other types.

@nikomatsakis
Copy link
Contributor

(I'll prepare a patch for configurable limits and a clearer error report ASAP)

@nikomatsakis
Copy link
Contributor

PR that "fixes" this problem available in #19466

@jdm we may be able to find a workaround in servo for time being

bors added a commit that referenced this issue Dec 9, 2014
This is particularly important for deeply nested types, which generate deeply nested impls. This is a fix for #19318. It's possible we could also improve this particular case not to increment the recursion count, but it's worth being able to adjust the recursion limit anyhow.

cc @jdm 
r? @pcwalton
@larsbergstrom
Copy link
Contributor

@jdm Did you find a workaround for this issue? It's still listed in servo/servo#2853

@jdm
Copy link
Contributor Author

jdm commented Jan 5, 2015

Yep!

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

No branches or pull requests

3 participants