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

[RFC] 改进更新配置方式 #703

Closed
10 tasks done
lilydjwg opened this issue Apr 11, 2018 · 12 comments
Closed
10 tasks done

[RFC] 改进更新配置方式 #703

lilydjwg opened this issue Apr 11, 2018 · 12 comments
Assignees

Comments

@lilydjwg
Copy link
Member

lilydjwg commented Apr 11, 2018

问题类型 / Type of issues

  • 其它 / other

@petronnyd9d0056#commitcomment-28473281 说的,把更新信息写在 lilac.py 里,比如:

update_on = [{
  'pypi': 'trio',
}, {
  'archpkg': 'python',
  'from_pattern': r'^(\d+\.\d+)\..*',
  'to_pattern': r'\1',
}]

这样,一个包的更新可以被多个来源的更新所触发。比如 Python 的库不仅跟踪 PyPI,而且在官方 python 包进行版本升级时也可以得到更新。

依赖:

使无效:

  • 使用 nvchecker.ini 中的信息寻找维护者。把维护者信息写于 lilac.py 中?

  • 解决 machine-readable errors lilydjwg/nvchecker#67
  • lilac 更新 nvchecker 版本
  • lilac 使用上述特性
  • lilac 兼容两种配置方案
  • pre-commit 兼容两种配置方案
  • 迁移少量 lilac.py 测试
  • 迁移所有 lilac.py
  • lilac 去除使用 nvchecker.ini 的方案
  • pre-commit 去除使用 nvchecker.ini 的方案
  • 清理脚本中去除 nvchecker.ini 的操作
@petronny
Copy link
Member

之前应该还要解决lilac.py只load一次的问题。。。

@lilydjwg
Copy link
Member Author

@petronny 啊,那个是什么问题来着?

@petronny
Copy link
Member

petronny commented Apr 11, 2018

就是现在检测依赖会读一次lilac.py
build包读pre_build时也会读一次lilac.py

然后 archlinuxcn/lilac#48 尝试设置time_limit时也会读一次lilac.py

现在这个upstream检测估计也会。。。

@lilydjwg
Copy link
Member Author

读多次会有什么问题呢?

@petronny
Copy link
Member

除了做了重复劳动就没了吧。。。

@lilydjwg
Copy link
Member Author

lilydjwg commented Apr 11, 2018

那就不管它好了……你有兴趣可以尝试着把加载之后的模块缓存起来。

@petronny
Copy link
Member

我试试

yan12125 pushed a commit that referenced this issue Jun 28, 2018
Ref: https://aur.archlinux.org/cgit/aur.git/commit/?h=python-git&id=7128266f2b9df6336bf6db5bc1ff1e1b5a713729

I don't think the it changes anything in clean chroots. Just keep
consistent.

And I hope #703 will be
implemented soon :)
lilydjwg added a commit to archlinuxcn/lilac that referenced this issue Sep 21, 2018
@lilydjwg
Copy link
Member Author

@farseerfc 你可以开始改 pre-commit 啦。

@farseerfc
Copy link
Member

farseerfc commented Sep 21, 2018

改好啦,現在 pre-commit 支持 update_on 寫在 lilac.py 裏或者出現在 nvchecker.ini ,也順便合併了之前整個放進子目錄 archlinuxcn 的那個 patch 。
不過因爲需要 ast.parse 所有的 lilac.py ,而且這些 lilac.py 讀自 git cat-file 而非工作目錄,所以會比之前慢一點。現在我這邊跑一次大概 4s 左右。
順便爲了測試,我已經把一個包 ydcv-rs-git 換到 update_on 了。

@lilydjwg
Copy link
Member Author

lilydjwg commented Oct 22, 2018

另见 #883 。我打算把 update_on 完全迁移到 lilac.yaml 里去。

@lilydjwg
Copy link
Member Author

lilydjwg commented Jan 6, 2019

@farseerfc 该你的 pre-commit 更新啦~

@farseerfc
Copy link
Member

pre-commit 移除了關於 nvchecker.ini 的檢查 b424854

lilydjwg added a commit to archlinuxcn/misc_scripts that referenced this issue Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants