Unify installer scripts
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- build-system, release
Hướng nghiên cứu
Bắt đầu bằng cách lập danh mục các script cài đặt NSIS, .sh đơn lẻ và .pkg hiện có, đồng thời đọc issue #646 về thay đổi NSIS đã được lên kế hoạch. So sánh các lựa chọn Shell và Python về khởi tạo trên Windows, runtime đi kèm, việc dọn dẹp registry và các mối lo ngại về phần mềm chống mã độc. Công việc được xem là hoàn tất khi đã quyết định hướng triển khai và có kế hoạch cụ thể để hợp nhất logic cài đặt dùng chung trong khi vẫn giữ các launcher nhỏ dành riêng cho từng nền tảng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Checklist
- I added a descriptive title
- I searched open requests and couldn't find a duplicate
What is the idea?
Constructor's install and uninstall scripts currently exist in 3 versions:
- NSIS script, for the .exe installer
- A single .sh script, for the .sh installer
- A number of separate .sh scripts, for the .pkg installer. These are similar to the single .sh script, but not identical.
Most changes to the installation process must therefore be implemented 3 times.
Since the existing NSIS script will have to be completely rewritten anyway when Constructor moves off NSIS (#646), it’s worth considering whether this is an opportunity to unify all 3 scripts into a single codebase, which would reduce the amount of duplicate maintenance work in the future.
What should happen?
There are two plausible options for which language a unified script could be written in:
Shell script:
-
Would allow us to reuse the existing scripts from the .sh and .pkg formats, which are complete and battle-tested.
-
The main issue is that Windows doesn't come with a Unix-like shell, so a shell executable would need to be bundled with the installer. This doesn't necessarily need to be Bash, since the existing script is already POSIX-compatible, and is verified as such using Shellcheck. A minimal, self-contained POSIX shell such as Dash is probably a better option.
-
Windows would also require implementations of external Unix commands such as
rmandcp. Something along the lines of BusyBox is probably the easiest way to provide these. Care would need to be taken to avoid using any versions of these commands which are already on the PATH of the target machine.
Python:
-
Much easier to write secure and reliable code.
-
Would require the installer to bundle a Python interpreter on all platforms. This is already present in installers which use conda-standalone, but not those that use micromamba.
- However, conda-standalone is already a requirement for most Windows installers, since micromamba doesn't support menuinst.
- @jaimergp also mentioned that a Python script is already used for some registry cleanup in the Windows uninstaller, because implementing it in NSIS was too difficult. This requires Python to be in the base environment even if it isn't used for anything else.
-
PyInstaller works well on all platforms, and allows us to use a Python build installed by conda from a trusted channel.
- The install script could be run either:
- Via the existing conda-standalone executable (
conda.exe python); or - Via a new PyInstaller executable containing the current conda-standalone functionality plus anything else needed.
- Via the existing conda-standalone executable (
- PyInstaller's main downside is slow startup time because of the initial extraction process. But this could be improved either by:
- Using PyInstaller's
onedirmode rather thanonefile; or - Doing everything within a single invocation of the executable, so it only has to be extracted once. For example, the script could execute conda commands via function calls if that is supported, or else by launching subprocesses via the Python executable in the PyInstaller temporary directory.
- Using PyInstaller's
- The install script could be run either:
-
MicroPython might be an option, but it appears to be not fully supported on WIndows. And most non-trivial code is not MicroPython-compatible out of the box, which would preclude using any third-party library.
Certain bootstrapping logic would still need to be written in a format supported directly by the OS – i.e. .sh on Linux and macOS, and .bat or .ps1 on Windows. But this would only be a small minority of the total code.
Additional Context
Windows-specific issues:
- The registry can be accessed using the
regcommand, so no additional tools or libraries are necessarily required for that. - Could shell or Python scripts be blocked by anti-malware systems?
- Ngôn ngữ chính
- Python
- Star
- 499
- Fork
- 185
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của conda/constructor
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
conda/constructor#1383 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type::bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
conda/constructor#1067 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
conda/constructor#1380 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Spike: Integrate conda-ship and conda-runtime for constructor buildsCó thể đã có người làm @marcoesters đã nhận 15 ngày trước. Đang mởtype::feature
conda/constructor#1378 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Size estimate low, based on constructor.yaml optionsCó thể đã có người làm @amaloney đã nhận 71 ngày trước. Đang mởtype::bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
conda/constructor#1330 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của conda/constructor
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
vllm-project/vllm#64845 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
dekobon/big-code-analysis#1729 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add `openai_safety_identifier`, the replacement for the `user` field that `openai_user` sendsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pydantic/pydantic-ai#12091 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100