You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are relative include paths meant to work within another include?
// test/A/B/C.cry
module A::B::C where
import A::B::D::E::F
include "G/H.pcry" // succeeds when run from `test/`
// test/A/B/D/E/F.cry
module A::B::D::E::F where
x = 1
// test/A/B/G/H.pcry
y = 2
include "I.pcry" # fails unless absolute path; no path relative to any parent is found
// test/A/B/G/I.pcry
z = 3
test$ cryptol
...
Cryptol> :m A::B::C // include "I.pcry"
Loading module Cryptol
Loading module A::B::D::E::F
Loading module A::B::C
`I.pcry` included at G/H.pcry:2:9--2:17 was not found
Cryptol> :m A::B::C // include "G/I.pcry"
Loading module Cryptol
Loading module A::B::D::E::F
Loading module A::B::C
`G/I.pcry` included at G/H.pcry:2:9--2:19 was not found
Cryptol> :m A::B::C // include "B/G/I.pcry"
Loading module Cryptol
Loading module A::B::D::E::F
Loading module A::B::C
`B/G/I.pcry` included at G/H.pcry:2:9--2:21 was not found
Cryptol> :m A::B::C // include "A/B/G/I.pcry"
Loading module Cryptol
Loading module A::B::D::E::F
Loading module A::B::C
`A/B/G/I.pcry` included at G/H.pcry:2:9--2:23 was not found
Cryptol> :m A::B::C // include "test/A/B/G/I.pcry"
Loading module Cryptol
Loading module A::B::D::E::F
Loading module A::B::C
`test/A/B/G/I.pcry` included at G/H.pcry:2:9--2:28 was not found
Cryptol> :m A::B::C // include "/.../test/A/B/G/I.pcry"
Loading module Cryptol
Loading module A::B::D::E::F
Loading module A::B::C
A::B::C>
The text was updated successfully, but these errors were encountered:
Hello, it's been long enough that I don't remember the thinking behind include, but looking at the source code I'd say this is a bug, as the code already is trying to handle includes relative to other includes. Fortunately, this looks like a simple 1line fix, that I did locally and things seem to work as expected. To help me see what's happening, I also modified the error message to show the path relative to which it was looking for things, which might be a good thing to commit anyway, as it seems like a helpful piece of information.
Are relative
include
paths meant to work within anotherinclude
?The text was updated successfully, but these errors were encountered: