numbas / editor

An editor for the Numbas e-learning system.
http://numbas.mathcentre.ac.uk
Apache License 2.0
59 stars 62 forks source link

Circular dependencies that are not circular #163

Closed anthonyyoud closed 11 years ago

anthonyyoud commented 11 years ago

Given the following variables:

index: random(0..1)

a:switch (
  index=0, b,
  index=1, 1
)

b:switch (
  index=0, 1,
  index=1, a
)

the editor reports errors computing the referenced variables a and b. This is because a references b and vice-versa, but the clauses of the switch statement will never give rise to a circular dependency.

This is obviously a trivial minimal example of the issue, and it could be worked around by defining more variables.

Perhaps circular dependencies should only be checked for within the relevant clauses of switch and if statements?

christianp commented 11 years ago

Oh man! Deciding what code can be reached is really hard, so I humbly request you think of a work around.

christianp commented 11 years ago

Can I close this as "not going to fix"?

BillFoster commented 11 years ago

Yes from me

From: Christian Perfect [mailto:notifications@github.com] Sent: 27 August 2013 11:18 AM To: numbas/editor Subject: Re: [editor] Circular dependencies that are not circular (#163)

Can I close this as "not going to fix"?

— Reply to this email directly or view it on GitHubhttps://github.com/numbas/editor/issues/163#issuecomment-23325760.

anthonyyoud commented 11 years ago

Yes.

On 27/08/13 11:19, Bill Foster wrote:

Yes from me

From: Christian Perfect [mailto:notifications@github.com] Sent: 27 August 2013 11:18 AM To: numbas/editor Subject: Re: [editor] Circular dependencies that are not circular (#163)

Can I close this as "not going to fix"?

— Reply to this email directly or view it on GitHubhttps://github.com/numbas/editor/issues/163#issuecomment-23325760.

— Reply to this email directly or view it on GitHub https://github.com/numbas/editor/issues/163#issuecomment-23325827.