-
Notifications
You must be signed in to change notification settings - Fork 0
Integrate diproche via swipl-wasm #118
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
base: master
Are you sure you want to change the base?
Conversation
Create an asynchronous wrapper around the swipl-wasm-interface
|
I added a deployment key to semaphore but it didn't work. I will look into what I did wrong tomorrow. |
7ad38cc to
022a695
Compare
|
I made the mistake of using https instead of ssh. Semaphore of course cannot use the deploy key with https. But the ssh set up doesn't work either even though I did things the same way as with the first diproche dependency. I tried a few things, but couldn't figure it out for now. |
|
Two errors occure. With npm start errorThe test of diprocheHandler test errorsThe latter error was resolvable by changing the import order, but there is still an issue with the diprocheHandler test just timing out and thus failing. It did work previously, when the swipl-wasm files were outside the src folder. |
|
|
||
| function addDiprocheIssues(unverifiedLines: number[]): void { | ||
| unverifiedLines.forEach((singleLine: number) => { | ||
| addIssue("UNVERIFIED_LINE", { fromIndex: singleLine, toIndex: singleLine}); |
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.
Lines are not indices
| // swipl-wasm cannot parse multiple results | ||
| // This line will display multiple results for a variable X in a bag | ||
| // Not a nice solution, could be improved upon. Works for diproche though. | ||
| return query("bagof(X, " + queryText.substr(0, queryText.length - 1) + ", Xs)."); |
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.
You could just do query = `bagof(X, ${queryText.substr(0, queryText.length - 1)}, Xs).`; in line 11. Then this function would always just behave the same and return a list of results (sometimes containing just a single element).
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 would cause issues with answers like "true" and only the same variable can be used which is X. But some more consistency really would be nice. I will see how I can manage this in the end.
Co-Authored-By: Fabian Grewing <Fabian.Heimbuerger@gmail.com>
Co-Authored-By: Fabian Grewing <Fabian.Heimbuerger@gmail.com>
Co-Authored-By: Fabian Grewing <Fabian.Heimbuerger@gmail.com>
Quiet some work has to be done here.
The swipl-wasm files cannot be imported via "import" because they are not in the src folder. It works with
npm testbut not withnpm start.Other issues may appear when using
npm startlike unused dependencies.If it works like this is yet to be seen. The tests pass for now.