Skip to content
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

IMPORT /check should use script checksum #1686

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Closed

IMPORT /check should use script checksum #1686

Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Labels
CC.resolved Issue with CureCode status built, tested or complete Datatype: module! Test.written Type.wish

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: BrianH

The script checksums in #1685 are much faster and more convenient than the method that the IMPORT /check option uses now. If we have IMPORT/check verify the checksum it will add a valuable feature: Not only is the module script verified to not be accidentally corrupted (#1685), but we can verify that it is the same module script we are expecting to use here. All you need to do is copy the checksum from the generated source to your Needs header, after the module reference. The system will do the rest.

It is probably a good idea to have a failed /check generate the same error it does now ('access 'invalid-check) so we can distinguish it from the simple corruption errors of #1685 ('syntax 'bad-checksum).

; Desired behavior

>> a: save/header none [print "Hello REBOL!"] [type: module checksum: true]
== #{
5245424F4C205B0A20202020747970653A206D6F64756C650A20202020636865
636B73756D3A20237B3444433843394545303431343034373038324646363045
36413236413930384443373837334643447D0A5D0A7072696E74202248656C6C
6F205245424F4C21220A
}

>> to-string a
== {REBOL [
    type: module
    checksum: #{4DC8C9EE0414047082FF60E6A26A908DC7873FCD}
]
print "Hello REBOL!"
}

>> c: select first load/header a 'checksum
== #{4DC8C9EE0414047082FF60E6A26A908DC7873FCD}

>> sys/load-module/check a c
Hello REBOL!
== [none make module! [
    ]]

Imported from: CureCode [ Version: alpha 107 Type: Wish Platform: All Category: Mezzanine Reproduce: Always Fixed-in:alpha 108 ]
Imported from: metaeducation#1686

Comments:


Rebolbot added the Type.wish on Jan 12, 2016


@Siskin-Bot Siskin-Bot added the CC.resolved Issue with CureCode status built, tested or complete label May 22, 2020
@Oldes Oldes closed this as completed Oct 26, 2020
Oldes added a commit to Oldes/Rebol3 that referenced this issue Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CC.resolved Issue with CureCode status built, tested or complete Datatype: module! Test.written Type.wish
Projects
None yet
Development

No branches or pull requests

2 participants