Grafito and its samples need updates
hamidb80 opened this issue · comments
Hey! I've just ran the code and seems like it does not work
══╡ Type Error ╞═════════════════════════════════════════
Erroneous type found
Cannot call function:
function .import: ◄
Wrong attribute value:
true :logical
Expected:
:block
┃ File: grafito.art
┃ Line: 46
┃
┃ 44 ║ dbpath :string :null
┃ 45 ║ body :block
┃ 46 ║► ][
┃ 47 ║ ;; description: « initiate a new graph environment with given name and body
┃ 48 ║ ;; options: [
when I make it inline like this:
graph: function [dbpath :string :null body :block][
it nags different line:
══╡ Type Error ╞═════════════════════════════════════════════════════════════════════════ <script> ══
Erroneous type found
Cannot call function:
function .import: ◄
Wrong attribute value:
true :logical
Expected:
:block
┃ File: grafito.art
┃ Line: 1326
┃
┃ 1324 ║ ; and that was it :)
┃ 1325 ║ return result
┃ 1326 ║► ]
┃ 1327 ║
┃ 1328 ║ ;--------------------------
This is because most of our examples are currently deprecated.
Basically on sample4.art
, this uses do.import
, and we don't provide this kind of importing anymore.
Now, the right way of doing this is by using the function import
.
Well, I'll rename your title to "Samples need to be updated.".
I couldn't find import
example in https://arturo-lang.io/documentation/language/ 😥
@hamidb80 this is because import
is a new feature, and since we didn't create the new release, the documentation is not fully updated.
If you want to check the import
, have a look on:
https://arturo-lang.io/master/documentation/library/core/import/
We've been using this for some time, and this have been very stable to us...
I'll put this update on my TODO list, and fix this very soon.