ags icon indicating copy to clipboard operation
ags copied to clipboard

Type generation fails

Open yashranjan1 opened this issue 1 year ago • 24 comments

Sorry if this is a stupid question but, when I init the type generation fails, im not sure why

ags init
error: type generation failed, try running
/usr/bin/npx -y @ts-for-gir/[email protected] generate * --ignoreVersionConflicts --outdir /home/yash/.config/ags/@girs -g /usr/local/share/gir-1.0 -g /usr/share/gir-1.0 -g /usr/share/*/gir-1.0 -g gir-1.0

When I try the recommended command it gives me the following error

/usr/bin/npx -y @ts-for-gir/[email protected] generate * --ignoreVersionConflicts --outdir /home/yash/.config/ags/@girs -g /usr/local/share/gir-1.0 -g /usr/share/gir-1.0 -g /usr/share/*/gir-1.0 -g gir-1.0
Adding generics...
ts-for-gir generate [modules..]

Generates Typescript type definition .d.ts files from GIR for GJS

Options:
      --version                 Show version number                    [boolean]
      --help                    Show help                              [boolean]
      --modules                 GIR modules to load, e.g. 'Gio-2.0'. Accepts mul
                                tiple modules           [array] [default: ["*"]]
  -g, --girDirectories          GIR directories
  [array] [default: ["/usr/local/share/gir-1.0","/usr/share/gir-1.0","/usr/share
  /*/gir-1.0","/usr/share/gnome-shell","/usr/share/gnome-shell/gir-1.0","/usr/li
        b64/mutter-*","/usr/lib/mutter-*","/usr/lib/x86_64-linux-gnu/mutter-*"]]
      --root                    Root directory of your project
                                        [string] [default: "/home/yash/.config"]
  -o, --outdir                  Directory to output to
                                                  [string] [default: "./@types"]
  -i, --ignore                  Modules that should be ignored
                                                           [array] [default: []]
  -v, --verbose                 Switch on/off the verbose mode
                                                       [string] [default: false]
      --ignoreVersionConflicts  Skip prompts for library version selection when
                                multiple versions are detected
                                                       [string] [default: false]
  -p, --print                   Print the output to console and create no files
                                                       [string] [default: false]
      --configName              Specify a custom name for the configuration file
                                          [string] [default: ".ts-for-girrc.js"]
  -d, --noNamespace             Do not export all symbols for each module as a n
                                amespace               [string] [default: false]
  -n, --noComments              Do not generate documentation comments
                                                       [string] [default: false]
      --promisify               Generate promisified functions for async/finish
                                calls                   [string] [default: true]
      --npmScope                Scope of the generated NPM packages
                                                     [string] [default: "@girs"]
      --workspace               Uses the workspace protocol for the generated pa
                                ckages which can be used with package managers l
                                ike Yarn and PNPM      [string] [default: false]
      --onlyVersionPrefix       Only use the version prefix for the ambient modu
                                le exports. This is useful if, for whatever reas
                                on, you want to use different library versions o
                                f the same library in your project.
                                                       [string] [default: false]
      --noPrettyPrint           Do not prettify the generated types
                                                       [string] [default: false]
      --noAdvancedVariants      Disable GLib.Variant class with string parsing
                                                        [string] [default: true]
      --package                 Generate the typescript types with package.json
                                support                [string] [default: false]

Examples:
  ts-for-gir generate                       Run 'ts-for-gir generate' in your gj
                                            s project to generate typings for yo
                                            ur project, pass the gir modules you
                                             need for your project
  ts-for-gir generate Gtk*                  You can also use wild cards
  ts-for-gir generate '*'                   If you want to parse all of your loc
                                            ally installed gir modules run
  ts-for-gir generate --configName='.ts-fo  Use a special config file
  r-gir.gtk4.rc.js
  ts-for-gir generate --ignore=Gtk-4.0 xra  Generate .d.ts. files but not for Gt
  ndr-1.3                                   k-4.0 and xrandr-1.3

Error: Could not generify Gtk 4.0
    at file:///home/yash/.npm/_npx/9947fdcb15df8564/node_modules/@ts-for-gir/lib/lib/generics/generify.js:17:19
    at generify (file:///home/yash/.npm/_npx/9947fdcb15df8564/node_modules/@ts-for-gir/lib/lib/generics/generify.js:25:5)
    at DependencyManager.transform (file:///home/yash/.npm/_npx/9947fdcb15df8564/node_modules/@ts-for-gir/lib/lib/gir/registry.js:105:9)
    at GenerationHandler.start (file:///home/yash/.npm/_npx/9947fdcb15df8564/node_modules/@ts-for-gir/cli/lib/generation-handler.js:35:18)
    at async Object.handler (file:///home/yash/.npm/_npx/9947fdcb15df8564/node_modules/@ts-for-gir/cli/lib/commands/generate.js:34:5)

Im not really sure whats going here

yashranjan1 avatar Nov 14 '24 13:11 yashranjan1

This usually means you don't have the gtk4 gir file installed. What distro are you on?

Aylur avatar Nov 14 '24 13:11 Aylur

arch

yashranjan1 avatar Nov 14 '24 14:11 yashranjan1

I'm currently using nixos.Same error happened here:

󰯉 ags types
error: type generation failed, try running
/nix/store/jz54v1m0ldqivx5i45q8i05pz5clf842-nodejs-20.18.0/bin/npx -y @ts-for-gir/[email protected] generate * --ignoreVersionConflicts --outdir /home/gus/.config/ags/@girs -g /usr/local/share/gir-1.0 -g /usr/share/gir-1.0 -g /usr/share/*/gir-1.0 -g /nix/store/slm7mb2626vbl9qwq9cgp1ix6szcyqvw-gtk+3-3.24.43-dev/share/gir-1.0 -g /nix/store/59knjxjaqd279yp8z8miw2kis2szql9n-at-spi2-core-2.54.0-dev/share/gir-1.0 -g /nix/store/1hhi03gg5jdb2fa5gb9ncklziczax741-glib-2.82.1-dev/share/gir-1.0 -g /nix/store/wmbg435clgdlqn4rrn8h5f4jhmhbk24f-gdk-pixbuf-2.42.12-dev/share/gir-1.0 -g /nix/store/h42324qxqnmmmpjg3skvvmllr1l75cma-gsettings-desktop-schemas-47.1/share/gir-1.0 -g /nix/store/774vgpw939f69xb47f2wz31j6di094bp-pango-1.54.0-dev/share/gir-1.0 -g /nix/store/sv5fvv7pimim1z48yyy4fs0amr93qg4q-harfbuzz-9.0.0-dev/share/gir-1.0 -g /nix/store/qrwgj7jhyazhs1kgr61y9k48v4dljxjb-librsvg-2.58.3-dev/share/gir-1.0 -g /nix/store/9qrx21qdxh9vlnmg4hzsh3saiig54q3q-gobject-introspection-wrapped-1.82.0-dev/share/gir-1.0 -g /nix/store/qrwgj7jhyazhs1kgr61y9k48v4dljxjb-librsvg-2.58.3-dev/share/gir-1.0 -g /nix/store/1hhi03gg5jdb2fa5gb9ncklziczax741-glib-2.82.1-dev/share/gir-1.0 -g /nix/store/wmbg435clgdlqn4rrn8h5f4jhmhbk24f-gdk-pixbuf-2.42.12-dev/share/gir-1.0 -g /nix/store/slm7mb2626vbl9qwq9cgp1ix6szcyqvw-gtk+3-3.24.43-dev/share/gir-1.0 -g /nix/store/59knjxjaqd279yp8z8miw2kis2szql9n-at-spi2-core-2.54.0-dev/share/gir-1.0 -g /nix/store/h42324qxqnmmmpjg3skvvmllr1l75cma-gsettings-desktop-schemas-47.1/share/gir-1.0 -g /nix/store/774vgpw939f69xb47f2wz31j6di094bp-pango-1.54.0-dev/share/gir-1.0 -g /nix/store/sv5fvv7pimim1z48yyy4fs0amr93qg4q-harfbuzz-9.0.0-dev/share/gir-1.0 -g /nix/store/4x4lqw85ljkg0x3qx0fxiq49fcjb4l5l-gobject-introspection-1.82.0-dev/share/gir-1.0 -g /nix/store/yw3rnyycd5avw59pczzlainzw954x6sr-astal-0.1.0-dev/share/gir-1.0 -g /nix/store/3smm6wfkc7vkc87lykpgpqq431sdq5sh-astal-3.0.0-dev/share/gir-1.0 -g /nix/store/7mjw24p0xfm45vcm04dxlmfydg00c3jw-gtk-layer-shell-0.9.0-dev/share/gir-1.0 -g /nix/store/3m08jxm3d356kksnb149p13wgdqnq23r-astal-4.0.0-dev/share/gir-1.0 -g /nix/store/k887w7d4qwd9n1lmnk4yblwd11mv5vak-gtk4-4.16.3-dev/share/gir-1.0 -g /nix/store/cnsg6r87wm9rc3v2c757kd0c96adb358-graphene-1.10.8-dev/share/gir-1.0 -g /nix/store/z5yzpa7h7iq4712akdvb14cjl3rs5sqi-gtk4-layer-shell-1.0.4-dev/share/gir-1.0

rogtino avatar Nov 15 '24 09:11 rogtino

I have the exact same error after installing aylurs-gtk-shell-git on Arch and running ags init.

Edit: ags run seems to work.

iCultureBud avatar Nov 16 '24 15:11 iCultureBud

Edit: ags run seems to work.

Ags run works because type generation is not essential for the widgets to work. Types are useful for LSP, makes writing your config a lot easier to debug.

yashranjan1 avatar Nov 16 '24 16:11 yashranjan1

The recommend command isn't working for me either. It's showing zsh: no matches found: /usr/share/*/gir-1.0. ags run doesn't work either.

Edit: surrounding it like "/usr/share/*/gir-1.0" shows the same error mentioned at the top.

OBLIXi-ON avatar Nov 17 '24 15:11 OBLIXi-ON

Use only one "-g" path where the girs modules are located (most likely it's /usr/share/gir-1.0/). * without quotes also generates errors. Try "*" or just remove it, it's still the default option.

npx -y @ts-for-gir/cli generate --ignoreVersionConflicts --outdir <YOUR-@girs-PATH> -g /usr/share/gir-1.0/

Loneattic avatar Nov 19 '24 21:11 Loneattic

npx -y @ts-for-gir/cli generate --ignoreVersionConflicts --outdir YOUR-@girs-PATH -g /usr/share/gir-1.0/

Tried this and got another error

Error: Failed to import Vulkan in GstVulkan, not installed or accessible.
    at GirModule.assertInstalledImport (file:///home/yash/.npm/_npx/4001ac8ae3bf4948/node_modules/@ts-for-gir/lib/lib/gir-module.js:279:19)
    at IntrospectedRecord.isSimpleType (file:///home/yash/.npm/_npx/4001ac8ae3bf4948/node_modules/@ts-for-gir/lib/lib/gir/class.js:821:45)
    at file:///home/yash/.npm/_npx/4001ac8ae3bf4948/node_modules/@ts-for-gir/lib/lib/gir/class.js:851:54
    at Array.every (<anonymous>)
    at IntrospectedRecord.isSimple (file:///home/yash/.npm/_npx/4001ac8ae3bf4948/node_modules/@ts-for-gir/lib/lib/gir/class.js:851:38)
    at file:///home/yash/.npm/_npx/4001ac8ae3bf4948/node_modules/@ts-for-gir/lib/lib/validators/class.js:111:84
    at Array.filter (<anonymous>)
    at removeComplexFields (file:///home/yash/.npm/_npx/4001ac8ae3bf4948/node_modules/@ts-for-gir/lib/lib/validators/class.js:98:31)
    at chainVisitors (file:///home/yash/.npm/_npx/4001ac8ae3bf4948/node_modules/@ts-for-gir/lib/lib/validators/class.js:208:23)
    at ClassVisitor.visitClass (file:///home/yash/.npm/_npx/4001ac8ae3bf4948/node_modules/@ts-for-gir/lib/lib/validators/class.js:213:28)

Either way i think this is something ags needs to address. If this was a one off thing that only i faced it would make sense to find my own fix, but the fact that so many people are facing this probably means that installing ags does not guarantee you have everything you need to develop with it installed and ready to use. Hope this can be addressed soon!

yashranjan1 avatar Nov 20 '24 12:11 yashranjan1

I had the same issue as well, but after a bit of thinking I figured this might have something to do with astal and then I realized i never installed astal or anything and just assumed it came with ags, but after running

yay -S libastal-io-git libastal-git
ags types

fixed it, but this should probably be in the ags documentation

RewardedIvan avatar Nov 22 '24 20:11 RewardedIvan

libastal-io-git libastal-git is required in ags in AUR(libastal-meta) I install both two but still have this problem

The-Lost-Light avatar Nov 23 '24 05:11 The-Lost-Light

I had same issue (ArchLinux)

List command prints me

> npx @ts-for-gir/cli list 

Dependencies not found:
- cairo-1.0
- freetype2-2.0
- xlib-2.0
- xft-2.0
- fontconfig-2.0
- libxml2-2.0
- Vulkan-1.0
- DBus-1.0

But most of these dependencies are installed in the system.

> pacman -Q cairo freetype2 fontconfig libxml2 vulkan-radeon dbus

cairo 1.18.2-2
freetype2 2.13.3-1
fontconfig 2:2.15.0-2
libxml2 2.13.5-1
vulkan-radeon 1:24.2.7-1
dbus 1.14.10-2

vnva avatar Nov 23 '24 09:11 vnva

@vnva thanks, that was really helpful. Those files are provided by the gobject-introspection package. I thought gjs depends on it so it should be installed, but its only a make dependency. So this should be added as a dependency to AGS, I will do so later.

kotontrion avatar Nov 23 '24 10:11 kotontrion

@kotontrion thanks, yes, that was the problem, after installing this package I was able to initialize the project using ags init.

vnva avatar Nov 23 '24 10:11 vnva

@vnva Thank you - after installing those packages ags types run through without problems. :)

iCultureBud avatar Nov 23 '24 20:11 iCultureBud

This didn't work for me when I had my config in a custom directory. I had to move it to ./config/ags

JohnOberhauser avatar Nov 26 '24 01:11 JohnOberhauser

For me on NixOS this solution does not work when my ags config is in my nixos configuration.

ArtemChandragupta avatar Nov 26 '24 19:11 ArtemChandragupta

I am also on NixOS. I diagnosed the issue by using the list subcommand of @ts-for-gir/[email protected] while passing in the gir directories ( same -g flags as the recommended generate command).

I resolved my issue by adding graphene and gtk4 into the extraPackages of ags, so it possibly might be worth adding those into buildInputs as well

agentx3 avatar Jan 15 '25 23:01 agentx3

This usually means you don't have the gtk4 gir file installed. What distro are you on?

Today, I encountered the same issue on Fedora 42, and resolved it by installing gtk4-devel.

So, if I'm not using gtk4, can I just ignore it? Otherwise, would you consider updating the docs?

purrion avatar Apr 28 '25 06:04 purrion

I just found the solution to my issue. Some files in my NPM cache were owned by root, and it was trying to overwrite them.

Perodactyl avatar May 07 '25 02:05 Perodactyl

Had the same issue on Arch

As per @vnva 's suggestion, I did npx @ts-for-gir/cli list, I got:

Dependencies not found:
- Rest-0.7

So I looked into /usr/share/gir-1.0/ and saw that Rest-1.0 was already installed, but not the 0.7 version. Doing pacman -Qs rest told me that Rest-1.0 came from the package librest. On my other Arch machine where ags types does work, and had Rest-0.7 installed, pacman -Qs rest told me that Rest-0.7 came from the package rest 0.8.1+r4+ge5ee6ef-1, but I have no idea what that package is or where it came from.

Eventually I copied the files /usr/share/gir-1.0/Rest-0.7.gir and /usr/share/gir-1.0/RestExtras-0.7.girfrom my Arch machine whereags types` does work, to my Arch machine where it does not. Solved the problem but it's not a very satisfactory solution.

nmattela avatar Jul 16 '25 18:07 nmattela

By default AGS will generate types for all installed gir libs, which in many cases is not necessary. You can specify a pattern for which libs to generate the types. Eg running ags types "Astal*" is probably sufficient in most cases. The types for other libs can still be generated by running it again with a different pattern later.

Maybe the default should change to a two step system. In the first step generate types for things that are actually needed for ags, eg Gtk, Gdk, Gtk layer shell, the astal libs. The second step generates the rest. Only the first step should fail, the second only print warnings. This would prevent this issue somewhat, as it won't be affected as much by random libs. Eg librest is not used by ags, astal, or any of its dependencies.

kotontrion avatar Jul 16 '25 18:07 kotontrion

I am seeing this issue using the flake.nix, adding gtk4 and graphene don't help. It also fails using nix run .#ags -- types "Astal*"

The output is

error: type generation failed, try running
/nix/store/whnr2rydma74q97zs56ic601ixs88njg-nodejs-22.17.0/bin/npx -y @ts-for-gir/cli generate Astal* --ignoreVersionConflicts --outdir /home/jonnie/.config/ags/@girs -g /usr/local/share/gir-1.0 -g /usr/share/gir-1.0 -g /usr/share/*/gir-1.0 -g /nix/store/47y7lh4rr4zzama53985x9k01f14i1lf-gir-dirs/share/gir-1.0

Output of the list command:

$ /nix/store/r1smm331j6crqs02mn986g06f7cpbggh-nodejs-22.17.0/bin/npx -y @ts-for-gir/[email protected] list
Found additional prefixes for DBusGLib: DBus
INFO: 
Search for gir files in:
- /usr/local/share/gir-1.0
- /usr/share/gir-1.0
- /usr/share/*/gir-1.0
- /usr/share/gnome-shell
- /usr/share/gnome-shell/gir-1.0
- /usr/lib64/mutter-*
- /usr/lib/mutter-*
- /usr/lib/x86_64-linux-gnu/mutter-*
- /nix/store/p2ihw9d4vfvijkbfkmy3m612lnnjr2i5-astal-0.1.0-dev/share/gir-1.0
- /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0
- /nix/store/689yi2ykzph2x4acnn2j6j5s54ymzn12-astal3-3.0.0-dev/share/gir-1.0
- /nix/store/5b4gn3jqabyqwbnz495wd2pqjs6ad7xl-gtk+3-3.24.49-dev/share/gir-1.0
- /nix/store/m899fawznma9nrs54db8qd3lf66937iz-at-spi2-core-2.56.2-dev/share/gir-1.0
- /nix/store/pjj7252yq7aahg22ws3w8y6vnqc7p2wx-gdk-pixbuf-2.42.12-dev/share/gir-1.0
- /nix/store/nf7mzdcnf321w9gsn8y84xz0mdfm9488-gsettings-desktop-schemas-48.0/share/gir-1.0
- /nix/store/baf1b1dp02v49gfsaxbsqbrlckq72ba9-pango-1.56.3-dev/share/gir-1.0
- /nix/store/wc9bdrifnj4nbah1x9ig4cprknn7n1g2-harfbuzz-11.2.1-dev/share/gir-1.0
- /nix/store/hrlqfja36fc0080m2x2j24psah37gp4m-gtk-layer-shell-0.9.2-dev/share/gir-1.0
- /nix/store/2al9aana075w2prpag4i7bgla90y12jr-astal4-4.0.0-dev/share/gir-1.0
- /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0
- /nix/store/szhzqadin3ayxlagzhkladfqmrs01kxk-graphene-1.10.8-dev/share/gir-1.0
- /nix/store/z3xzg94dm1xw1qnabg2lngmrhmfm2sx4-gtk4-layer-shell-1.1.1-dev/share/gir-1.0
- /nix/store/m4mkwpd2cppymh226x9wv8in76d3jsnf-librsvg-2.60.0-dev/share/gir-1.0
- /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0
- /nix/store/xigm5bf89akly45iqpgfc0rmj4nr645n-libadwaita-1.7.4-dev/share/gir-1.0
- /nix/store/lxv63pa4rv4yk0c7igg4dk8k774kx5h3-gobject-introspection-1.84.0-dev/share/gir-1.0
INFO: 
Selected Modules:
- AstalIO-0.1
  - /nix/store/p2ihw9d4vfvijkbfkmy3m612lnnjr2i5-astal-0.1.0-dev/share/gir-1.0/AstalIO-0.1.gir
- Astal-3.0
  - /nix/store/689yi2ykzph2x4acnn2j6j5s54ymzn12-astal3-3.0.0-dev/share/gir-1.0/Astal-3.0.gir
- Astal-4.0
  - /nix/store/2al9aana075w2prpag4i7bgla90y12jr-astal4-4.0.0-dev/share/gir-1.0/Astal-4.0.gir
- GdkPixdata-2.0
  - /nix/store/pjj7252yq7aahg22ws3w8y6vnqc7p2wx-gdk-pixbuf-2.42.12-dev/share/gir-1.0/GdkPixdata-2.0.gir
- GdkPixbuf-2.0
  - /nix/store/pjj7252yq7aahg22ws3w8y6vnqc7p2wx-gdk-pixbuf-2.42.12-dev/share/gir-1.0/GdkPixbuf-2.0.gir
- GDesktopEnums-3.0
  - /nix/store/nf7mzdcnf321w9gsn8y84xz0mdfm9488-gsettings-desktop-schemas-48.0/share/gir-1.0/GDesktopEnums-3.0.gir
- PangoXft-1.0
  - /nix/store/baf1b1dp02v49gfsaxbsqbrlckq72ba9-pango-1.56.3-dev/share/gir-1.0/PangoXft-1.0.gir
- PangoOT-1.0
  - /nix/store/baf1b1dp02v49gfsaxbsqbrlckq72ba9-pango-1.56.3-dev/share/gir-1.0/PangoOT-1.0.gir
- PangoFc-1.0
  - /nix/store/baf1b1dp02v49gfsaxbsqbrlckq72ba9-pango-1.56.3-dev/share/gir-1.0/PangoFc-1.0.gir
- PangoFT2-1.0
  - /nix/store/baf1b1dp02v49gfsaxbsqbrlckq72ba9-pango-1.56.3-dev/share/gir-1.0/PangoFT2-1.0.gir
- PangoCairo-1.0
  - /nix/store/baf1b1dp02v49gfsaxbsqbrlckq72ba9-pango-1.56.3-dev/share/gir-1.0/PangoCairo-1.0.gir
- Pango-1.0
  - /nix/store/baf1b1dp02v49gfsaxbsqbrlckq72ba9-pango-1.56.3-dev/share/gir-1.0/Pango-1.0.gir
- HarfBuzz-0.0
  - /nix/store/wc9bdrifnj4nbah1x9ig4cprknn7n1g2-harfbuzz-11.2.1-dev/share/gir-1.0/HarfBuzz-0.0.gir
- GtkLayerShell-0.1
  - /nix/store/hrlqfja36fc0080m2x2j24psah37gp4m-gtk-layer-shell-0.9.2-dev/share/gir-1.0/GtkLayerShell-0.1.gir
- Atspi-2.0
  - /nix/store/m899fawznma9nrs54db8qd3lf66937iz-at-spi2-core-2.56.2-dev/share/gir-1.0/Atspi-2.0.gir
- Atk-1.0
  - /nix/store/m899fawznma9nrs54db8qd3lf66937iz-at-spi2-core-2.56.2-dev/share/gir-1.0/Atk-1.0.gir
- GioUnix-2.0
  - /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0/GioUnix-2.0.gir
- Gio-2.0
  - /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0/Gio-2.0.gir
- GObject-2.0
  - /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0/GObject-2.0.gir
- GModule-2.0
  - /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0/GModule-2.0.gir
- GLibUnix-2.0
  - /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0/GLibUnix-2.0.gir
- GLib-2.0
  - /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0/GLib-2.0.gir
- GIRepository-3.0
  - /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0/GIRepository-3.0.gir
- GIRepository-2.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/GIRepository-2.0.gir
- Gtk-4.0
  - /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0/Gtk-4.0.gir
- Gtk-3.0
  - /nix/store/5b4gn3jqabyqwbnz495wd2pqjs6ad7xl-gtk+3-3.24.49-dev/share/gir-1.0/Gtk-3.0.gir
- Gsk-4.0
  - /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0/Gsk-4.0.gir
- GdkX11-4.0
  - /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0/GdkX11-4.0.gir
- GdkX11-3.0
  - /nix/store/5b4gn3jqabyqwbnz495wd2pqjs6ad7xl-gtk+3-3.24.49-dev/share/gir-1.0/GdkX11-3.0.gir
- GdkWayland-4.0
  - /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0/GdkWayland-4.0.gir
- Gdk-4.0
  - /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0/Gdk-4.0.gir
- Gdk-3.0
  - /nix/store/5b4gn3jqabyqwbnz495wd2pqjs6ad7xl-gtk+3-3.24.49-dev/share/gir-1.0/Gdk-3.0.gir
- Graphene-1.0
  - /nix/store/szhzqadin3ayxlagzhkladfqmrs01kxk-graphene-1.10.8-dev/share/gir-1.0/Graphene-1.0.gir
- Rsvg-2.0
  - /nix/store/m4mkwpd2cppymh226x9wv8in76d3jsnf-librsvg-2.60.0-dev/share/gir-1.0/Rsvg-2.0.gir
- Gtk4SessionLock-1.0
  - /nix/store/z3xzg94dm1xw1qnabg2lngmrhmfm2sx4-gtk4-layer-shell-1.1.1-dev/share/gir-1.0/Gtk4SessionLock-1.0.gir
- Gtk4LayerShell-1.0
  - /nix/store/z3xzg94dm1xw1qnabg2lngmrhmfm2sx4-gtk4-layer-shell-1.1.1-dev/share/gir-1.0/Gtk4LayerShell-1.0.gir
- Adw-1
  - /nix/store/xigm5bf89akly45iqpgfc0rmj4nr645n-libadwaita-1.7.4-dev/share/gir-1.0/Adw-1.gir
- xrandr-1.3
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/xrandr-1.3.gir
- xlib-2.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/xlib-2.0.gir
- xft-2.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/xft-2.0.gir
- xfixes-4.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/xfixes-4.0.gir
- win32-1.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/win32-1.0.gir
- libxml2-2.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/libxml2-2.0.gir
- freetype2-2.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/freetype2-2.0.gir
- fontconfig-2.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/fontconfig-2.0.gir
- cairo-1.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/cairo-1.0.gir
- Vulkan-1.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/Vulkan-1.0.gir
- GL-1.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/GL-1.0.gir
- DBusGLib-1.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/DBusGLib-1.0.gir
- DBus-1.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/DBus-1.0.gir

Conflicts:
- Astal
  - Astal-3.0
  - /nix/store/689yi2ykzph2x4acnn2j6j5s54ymzn12-astal3-3.0.0-dev/share/gir-1.0/Astal-3.0.gir
  - Astal-4.0
  - /nix/store/2al9aana075w2prpag4i7bgla90y12jr-astal4-4.0.0-dev/share/gir-1.0/Astal-4.0.gir
- GIRepository
  - GIRepository-3.0
  - /nix/store/adzh287p7iwf5j6l9xkffzcm9vbszjvw-glib-2.84.3-dev/share/gir-1.0/GIRepository-3.0.gir
  - GIRepository-2.0
  - /nix/store/cidwnq88rkb45gm9fqhykrjc1gja70b8-gobject-introspection-wrapped-1.84.0-dev/share/gir-1.0/GIRepository-2.0.gir
- Gtk
  - Gtk-4.0
  - /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0/Gtk-4.0.gir
  - Gtk-3.0
  - /nix/store/5b4gn3jqabyqwbnz495wd2pqjs6ad7xl-gtk+3-3.24.49-dev/share/gir-1.0/Gtk-3.0.gir
- GdkX11
  - GdkX11-4.0
  - /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0/GdkX11-4.0.gir
  - GdkX11-3.0
  - /nix/store/5b4gn3jqabyqwbnz495wd2pqjs6ad7xl-gtk+3-3.24.49-dev/share/gir-1.0/GdkX11-3.0.gir
- Gdk
  - Gdk-4.0
  - /nix/store/iszcsdyqj80pli6i6y48ahlc6jkspgxs-gtk4-4.18.6-dev/share/gir-1.0/Gdk-4.0.gir
  - Gdk-3.0
  - /nix/store/5b4gn3jqabyqwbnz495wd2pqjs6ad7xl-gtk+3-3.24.49-dev/share/gir-1.0/Gdk-3.0.gir

EDIT: I was trying to do those commands directly in the examples/gtk4/simple_bar directory. I tried nix run .#ags -- init -d ./bar/ and it works fine.

For context I am upgrading from 1.x to 3.x so I'm trying to develop my new config in a devshell in a clone of the ags repo, so I can keep my existing 1.x bar running until I'm ready to change my system over to the new one.

JonnieCache avatar Aug 04 '25 09:08 JonnieCache

Got this recently:

> ags types -v
executing: /usr/bin/npx -y @ts-for-gir/[email protected] generate * --ignoreVersionConflicts --outdir .config/ags/@girs -g /usr/local/share/gir-1.0 -g /usr/share/gir-1.0 -g /usr/share/*/gir-1.0 -g
node:internal/modules/typescript:183
    throw new ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING(filename);
          ^

Error [ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING]: Stripping types is currently unsupported for files under node_modules, for "file://.npm/_npx/24f50c9ed13719e6/node_modules/@ts-for-gir/lib/src/index.ts"

Opened this .npm/_npx/24f50c9ed13719e6/node_modules/@ts-for-gir/lib/package.json which showed:

{
  "name": "@ts-for-gir/lib",
  "version": "4.0.0-beta.38",
  ....

Then I run (same command ags runs but using the version shown in the package.json above) and it worked (Some errors shown but it updated the classes and the ones I looked at that were wrong before are accurate now): /usr/bin/npx -y @ts-for-gir/[email protected] generate --ignoreVersionConflicts --outdir /home/xyze/.config/ags/@girs -g /usr/local/share/gir-1.0 -g /usr/share/gir-1.0 -g '/usr/share/*/gir-1.0' -g

unai-ndz avatar Sep 21 '25 23:09 unai-ndz

Got this recently:

ags types -v executing: /usr/bin/npx -y @ts-for-gir/[email protected] generate * --ignoreVersionConflicts --outdir .config/ags/@girs -g /usr/local/share/gir-1.0 -g /usr/share/gir-1.0 -g /usr/share/*/gir-1.0 -g node:internal/modules/typescript:183 throw new ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING(filename); ^

Error [ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING]: Stripping types is currently unsupported for files under node_modules, for "file://.npm/_npx/24f50c9ed13719e6/node_modules/@ts-for-gir/lib/src/index.ts" Opened this .npm/_npx/24f50c9ed13719e6/node_modules/@ts-for-gir/lib/package.json which showed:

{ "name": "@ts-for-gir/lib", "version": "4.0.0-beta.38", .... Then I run (same command ags runs but using the version shown in the package.json above) and it worked (Some errors shown but it updated the classes and the ones I looked at that were wrong before are accurate now): /usr/bin/npx -y @ts-for-gir/[email protected] generate --ignoreVersionConflicts --outdir /home/xyze/.config/ags/@girs -g /usr/local/share/gir-1.0 -g /usr/share/gir-1.0 -g '/usr/share/*/gir-1.0' -g

Can confirm that running this with the right version worked for me on arch.

Pixwarron avatar Oct 19 '25 12:10 Pixwarron