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

ags: 1.8.2 -> 2.2.1 #373562

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

ags: 1.8.2 -> 2.2.1 #373562

wants to merge 2 commits into from

Conversation

PerchunPak
Copy link
Member

@PerchunPak PerchunPak commented Jan 13, 2025

https://github.com/Aylur/ags: Scaffolding CLI for Astal+TypeScript

This is basically a complete rewrite (as upstream was rewritten in Go). It is required for #350324, I also built a completely functioning version of hyprpanel using this, so it totally works!

Also, it is almost 1 to 1 copy of the upstream Nix implementation, but this is much more versatile.

Closes #306446

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

CC @FliegendeWurst @foo-dogsquared @JohnRTitor


Add a 👍 reaction to pull requests you find important.

ldflags = [
"-s"
"-w"
"-X main.astalGjs=${astal.gjs}/share/astal/gjs"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, because of this single line I wasted an entire day

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jan 13, 2025
@PerchunPak
Copy link
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 373562


x86_64-linux

✅ 1 package built:
  • ags

aarch64-linux

✅ 1 package built:
  • ags

Copy link
Contributor

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a release-notes, prompting users to switch to ags_1 if they want to retain compatibility with previous config.

As this is a backwards incompatible change, we should not backport it.

@PerchunPak PerchunPak force-pushed the ags branch 2 times, most recently from 421966a to 83bd23a Compare January 14, 2025 07:08
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog labels Jan 14, 2025
@@ -212,6 +212,8 @@
[v1.7.0](https://github.com/jtroo/kanata/releases/tag/v1.7.0)
for more information.

- `ags` was updated to v2, which is brand new project with different goals. If you still need v1, use `ags_1`.
Copy link
Contributor

@JohnRTitor JohnRTitor Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Different" goals? Is it not used to create widgets on a WM?

Copy link
Member Author

@PerchunPak PerchunPak Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@PerchunPak PerchunPak Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps v2 could be exposed as ags-cli and leave ags to v1

EDIT: I like this idea more than a breaking change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps v2 could be exposed as ags-cli and leave ags to v1

No. Package name should be in line with upstream unless it causes ambiguity.

Most people (incoming and existing users) will expect that ags points to new v2, while those who need the older version should be allowed to use ags_1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that most, if not all, ags_1 features have been moved to agstal.

ags_2 is just now an interpreter for Widget configs written in typescript/javascript. @Aylur that is correct I think?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ags_1 was rewritten from scratch in Vala and C so it can be used outside of JS/TS. It was split into multiple libraries under the Astal name. ags_2 is a CLI that provides the same workflow as ags_1 so that users can jump right into it and "write a config" instead of setting up an typescript with Astal project themselves. Its basically a wrapper around esbuild. It still has the same goal as v1 though, which is to make writing widgets on WMs accessible.

I would prefer v2 to be ags and v1 to be ags_1 if I have a say in it.

@JohnRTitor JohnRTitor dismissed their stale review January 14, 2025 08:15

Don't block

@github-actions github-actions bot removed 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog labels Jan 14, 2025
@PerchunPak PerchunPak changed the title ags: 1.8.2 -> 2.2.1 ags-cli: init at 2.2.1 Jan 14, 2025
@PerchunPak PerchunPak changed the title ags-cli: init at 2.2.1 ags: 1.8.2 -> 2.2.1 Jan 14, 2025
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog labels Jan 14, 2025
@JohnRTitor JohnRTitor self-assigned this Jan 14, 2025
@JohnRTitor
Copy link
Contributor

I'll get to reviewing Friday of next week.

(Will be busy for work for the next week till the weekend)

If anyone wants to review this and merge, they can go ahead.


meta = {
description = "Scaffolding CLI for Astal+TypeScript";
Copy link
Contributor

@JohnRTitor JohnRTitor Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per https://github.com/NixOS/nixpkgs/pull/373562/files#r1914975896

Something like "Typescript frontend of Widget system powered by Astal"

You can put more details/explain in longDescription

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find your description a bit difficult to follow without any background context. In comparison, the description from upstream seems a bit clearer in this regard.

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ags (unstable): systemtray service not working (missing packages)
4 participants