observablehq/runtime

The behavior of circular import-with’s is nondeterministic.

mbostock opened this issue · 1 comments

I don’t think we can support circular import-with’s, so we should probably detect when it’s happening and abort. Here’s a minimal reproduction of nondeterministic behavior:

A

bar // RuntimeError: bar could not be resolved
import {} from "B"
import {bar} from "C"

B

import {foo} with {} from "C"

C

foo = "foo"
import {foo as bar} with {} from "B"

Fixed in #191.