-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
RubiksCube/lakefile.lean
Outdated
open System Lake DSL | ||
|
||
def jsTarget (pkgDir : FilePath) : FileTarget := | ||
let jsFile := pkgDir / "widget/dist/rubiks.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work on windows, perhaps this would be better:
let jsFile := pkgDir / "widget" / "dist" / "rubiks.js"
let srcFiles := inputFileTarget <| pkgDir / "widget" / "src" / "rubiks.tsx"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the proposed change is good, but we also need this fix in lean for it to work: leanprover/lean4#1257
@lovettchris this should be ready for review and testing. |
|
@lovettchris unfortunately we are blocked on leanprover/lean4#2762 and this error will likely come up again. However please see the updated |
I think the problem is that you are hard coding forward slashes in a string literal which results in an invalid path on Windows. Can you change include_str to take a
which generates the correct backslash path on Windows? We then seems to have one more bug in System.FilePath where it is generating a leading 'slash' in the combined path |
It looks like it's failing in the |
Could be related to that open issue, but it's definitely failing in the include_str, I see this in the editor: I also filed this new bug against lean as a reminder to complete that open PR: |
I also verified that leanprover/lean4#1257 fixes the NPM build problem, but not the path problem, so I still see this in the editor (on Windows) after |
@EdAyers can you add a link and small blurb about the sample in the top level https://github.com/EdAyers/lean4-samples/blob/rubiks/README.md ? |
depends on leanprover-community/lean4-samples#3 - fix some errors spotted by @utensil - remove some todos - update link to sample
@leodemoura could the |
Yes! |
Added here: leanprover/lean4@98513fa |
This PR includes a minimal example of user widgets and a more involved rubiks cube example
Tasks
add an example RPC call to WidgetsMinimalinclude_str
to utility file or put in core?