你在干什么?
-
@2412322029 即使环境变量有问题, 但是直接在core环境下运行代码也不应该报错啊
-
@sunrisepeak commit 是这个
-
xmake 显示error: invalid task: xlings
-
@sunrisepeak 是的
24123@lolik ~\xlings\core git:main > xmake xlings error: cannot import module: xlings, cannot import module: xim.xim, cannot import module: CmdProcessor, cannot import module: xim.index.IndexManager, 21.061108
-
-
我删除了环境变量,重新下载git仓库安装
24123@lolik ~\xlings\core git:main > xmake l xim\xim.lua error: cannot import module: xim, cannot import module: CmdProcessor, cannot import module: xim.index.IndexManager, 21.068780
-
xim\xim.lua import("CmdProcessor") 这里没有CmdProcessor这个模块
-
把这个加载配置代码给删除, 显示指定"https://github.com/d2learn/xim-pkgindex" 试一试, 可能是这个问题
-- remote package repo manager -- 1. auto update - enable or disable | day week month -- 2. multi-repo support -- 3. private repo support import("xim.base.runtime") local data_dir = runtime.get_xim_data_dir() local RepoManager = {} RepoManager.__index = RepoManager function new() RepoManager.repos = { "https://github.com/d2learn/xim-pkgindex", } RepoManager.updateSchedule = 30 -- days return RepoManager end function RepoManager:sync() for _, repo in ipairs(self.repos) do print("[xlings: xim]: sync package index repo:", repo) local repodir = _to_repodir(repo) if os.isdir(repodir) then os.cd(repodir) os.exec("git pull") else os.cd(data_dir) os.exec("git clone " .. repo) end end end function RepoManager:repodirs() local dirs = {} for _, repo in ipairs(self.repos) do local repodir = _to_repodir(repo) if not os.isdir(repodir) then os.cd(data_dir) os.exec("git clone " .. repo) end table.insert(dirs, repodir) end return dirs end function _to_repodir(repo) local dir = string.split(path.filename(repo), ".git")[1] local repodir = path.join(data_dir, dir) return repodir end function main() local repoManager = new() repoManager:sync() print(repoManager:repodirs()) print(_to_repodir("my/myrepo")) end
-
@2412322029 和xim.lua同级目录里有
-
> xmake l xim\xim.lua Cloning into 'xim-pkgindex'... remote: Enumerating objects: 263, done. remote: Counting objects: 100% (150/150), done. remote: Compressing objects: 100% (99/99), done. remote: Total 263 (delta 88), reused 95 (delta 46), pack-reused 113 (from 1) Receiving objects: 100% (263/263), 63.15 KiB | 1.04 MiB/s, done. Resolving deltas: 100% (118/118), done. [xlings:xim]: rebuild index database [xlings:xim]: update index database XIM - Xlings Installation Manager xim version: pre-v0.0.2
-
@2412322029 很奇怪, 目前还每发现为什么这个会有问题
-
@2412322029 这样应该就可以安装使用了。我研究一下为什么这个会在特定环境下报错
-
24123@lolik ~ > xlings error: cannot import module: xlings, cannot import module: xim.xim, cannot import module: CmdProcessor, cannot import module: xim.index.IndexManager, 21.055102
对应的文件都有,不知道
-
我重新运行安装脚本
-
@2412322029 就是刚刚哪个地方的问题, 你可以显式指定, 改一下哪个地方的代码 然后执行安装脚本 应该就可以用了。具体原因可能要研究一下
-
网络问题
-
proxychains .\tools\install.win.bat 使用代理安装成功了,github测试环境都在国外
-
@2412322029 没有修改代码也安装成功了吗
-
@sunrisepeak 改了代码运行还是会报错,我重新运行安装脚本一直在下载xvm重试,然后加上代理,就安装成功了,代码没有还原
-
@2412322029 如果代码还原 加上代理可以安装成功吗, 按理最新代码如果github用不了会选择gitee