Skip to content

Commit

Permalink
Use a shorter hash for pkg-cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
CuppoJava committed May 6, 2024
1 parent f530e6d commit 0b7c9e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/params.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public defn compiler-flags () :
to-tuple(COMPILE-FLAGS)

;========= Stanza Configuration ========
public val STANZA-VERSION = [0 18 67]
public val STANZA-VERSION = [0 18 68]
public var STANZA-INSTALL-DIR:String = ""
public var OUTPUT-PLATFORM:Symbol = `platform
public var STANZA-PKG-DIRS:List<String> = List()
Expand Down
8 changes: 5 additions & 3 deletions compiler/pkg.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ defn hash-string (mode:CacheFilename) -> String :
if debug?(mode) :
print(buffer, "[DEBUG]")
print(buffer, source-file(mode))
buffer $> to-bytearray
$> sha256-hash
$> to-hex
val hashstring = buffer
$> to-bytearray
$> sha256-hash
$> to-hex
hashstring[0 to 16]

0 comments on commit 0b7c9e4

Please sign in to comment.