Skip to content

Commit e0f46a1

Browse files
committed
chore!: drop dubious Recrafted "support"
Let's drop this "officially" to avoid misleading people. Also, clean up how system-level APIs are imported. Reopens #12
1 parent eeddf70 commit e0f46a1

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- Logging is slightly less verbose. Debug logging can be enabled by setting
1717
the `_G.UNICORN_DEBUG_DO_NOT_USE_IN_PRODUCTION_CODE` variable to `1`.
1818
**This interface is not stable.**
19+
- [Recrafted](https://ocaweso.me/recrafted/) is no longer officially supported.
20+
The initial support was very subpar, and went untested for so long
21+
that it broke entirely.
22+
**Recrafted support will come back in a future release.**
23+
(Tracked by [#12](https://github.com/unicornpkg/libunicornpkg/issues/12))
1924

2025
## v1.2.1
2126

unicorn/core.lua

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@ local semver = require("semver")
1111
-- selene: allow(global_usage)
1212
local sha256 = _G.sha256 or require("sha256") -- Some servers provide access to a Java-based hashing API; we should use that where possible
1313

14-
-- better handling of globals with Lua diagnostics
15-
---@diagnostic disable:undefined-global
16-
local fs = fs
17-
local textutils = textutils
18-
---@diagnostic enable:undefined-global
19-
20-
if _HOST:find("Recrafted") then -- Recrafted support
21-
fs = require("fs")
22-
textutils = require("textutils")
23-
end
24-
2514
local function is_installed(package_name)
2615
if fs.exists("/etc/unicorn/packages/installed/" .. package_name) then
2716
return true

unicorn/util.lua

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ local unicorn = {}
55
--- @class unicorn.util
66
unicorn.util = {}
77

8-
local http = http
9-
local fs = fs
10-
if _HOST:find("Recrafted") then -- Recrafted support
11-
http = require("http")
12-
fs = require("fs")
13-
end
14-
158
---@description Returns contents of HTTP(S) request
169
---@deprecated "Use http.get instead"
1710
---@param url string A valid HTTP or HTTPS URL.

0 commit comments

Comments
 (0)