Skip to content

Conversation

@kassane
Copy link

@kassane kassane commented Mar 2, 2025

What does this PR do

This adds support for ldcup (ldc2 version manager). Although not officially provided by the ldc-developers group, it is community based to facilitate ldc2 usage.
src: https://github.com/kassane/ldcup

The tool doesn't support other D compilers (dmd/gdc).

Standards checklist

  • The PR title is descriptive
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself
  • If this PR introduces new user-facing messages they are translated

For new steps

  • Optional: Topgrade skips this step where needed
  • Optional: The --dry-run option works with this step
  • Optional: The --yes option works with this step if it is supported by
    the underlying command
dry-run output
 ./target/release/topgrade --dry-run      

── 12:41:48 - System update ────────────────────────────────────────────────────
Dry running: /usr/bin/trizen -Syu

── 12:41:48 - Flatpak User Packages ────────────────────────────────────────────
Dry running: /usr/bin/flatpak update --user

── 12:41:48 - Flatpak System Packages ──────────────────────────────────────────
Dry running: /usr/bin/flatpak update --system

── 12:41:48 - Nix ──────────────────────────────────────────────────────────────
Dry running: /usr/bin/nix-channel --update
Dry running: /usr/bin/nix --version

── 12:41:48 - oh-my-zsh ────────────────────────────────────────────────────────
Dry running: zsh /home/kassane/.oh-my-zsh/tools/upgrade.sh

── 12:41:48 - TLDR ─────────────────────────────────────────────────────────────
Dry running: /usr/bin/tldr --update

── 12:41:48 - rustup ───────────────────────────────────────────────────────────
Dry running: /usr/bin/rustup update

── 12:41:48 - Cargo ────────────────────────────────────────────────────────────
cargo-update isn't installed so Topgrade can't upgrade cargo packages.
Install cargo-update by running `cargo install cargo-update`

── 12:41:48 - Visual Studio Code extensions ────────────────────────────────────
Dry running: /usr/bin/code --update-extensions

── 12:41:48 - Helix ────────────────────────────────────────────────────────────
Dry running: /usr/bin/helix --grammar fetch
Dry running: /usr/bin/helix --grammar build

── 12:41:48 - Containers ───────────────────────────────────────────────────────
Dry running: /usr/bin/docker pull moby/buildkit:buildx-stable-1 --platform linux/amd64

── 12:41:49 - Lensfun's database update ────────────────────────────────────────
Dry running: /usr/bin/lensfun-update-data 

── 12:41:49 - zigup ────────────────────────────────────────────────────────────
Dry running: /home/kassane/.local/bin/zigup fetch master

── 12:41:49 - ldcup ────────────────────────────────────────────────────────────
Dry running: /home/kassane/.dlang/ldcup install master

── 12:41:49 - Summary ──────────────────────────────────────────────────────────
System update: OK
config-update: OK
Flatpak: OK
oh-my-zsh: OK
TLDR: OK
rustup: OK
Visual Studio Code extensions: OK
helix: OK
Containers: OK
Lensfun's database update: OK
zigup: OK
ldcup: OK

Pacman backup configuration files found:
/etc/pacman.d/mirrorlist.pacnew
/etc/makepkg.conf.d/rust.conf.pacnew
/etc/bash.bashrc.pacnew
/etc/mkinitcpio.conf.pacnew
/etc/sudoers.pacnew
/etc/locale.gen.pacnew
/etc/pacman.conf.pacnew

If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.

@kassane kassane changed the title ldcup (ldc2 version manager) support added Add ldcup (ldc2 version manager) step Mar 3, 2025
@SteveLauC
Copy link
Member

Thanks for the PR! This is a promising tool, but I wanna add it when it has some users as Topgrade is for most people.

In case you want to run it yourself, you can embed it using custom_commands:

# Custom commands
[commands]
# "Python Environment" = "~/dev/.env/bin/pip install -i https://pypi.python.org/simple -U --upgrade-strategy eager jupyter"
# "Custom command using interactive shell (unix)" = "-i vim_upgrade"

@GideonBear
Copy link
Member

(Given my selfish inclusion of falconf :D) my stance is different; I will accept unpopular steps as long as:

  1. It's not slop; there's effort put into it (doesn't look like it)
  2. It doesn't use a binary name that could cause conflicts (doesn't look like it)
  3. Their maintainer commits to maintaining the tool for the forseeable future
  4. You regularly use it yourself

Can you confirm you're still using ldcup yourself, and want to keep maintaining it?

If yes, please rebase; we've had some changes in the way steps are defined, see https://github.com/topgrade-rs/topgrade/blob/main/CONTRIBUTING.md for more info

@kassane
Copy link
Author

kassane commented Nov 19, 2025

Hi @GideonBear ,

Yes, I use it daily.

Even the project's own CI/CD tests the commands, which is an important consideration.

The unpopularity has reached the small D community, who have become accustomed to using the official dlang shell script to install DMD/LDC/GDC or through OS package management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants