Skip to content

Commit 63563e9

Browse files
authored
v50 fixes (#1027)
1 parent eddddd6 commit 63563e9

10 files changed

Lines changed: 135 additions & 101 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,65 +9,52 @@ on:
99

1010
jobs:
1111
CI:
12+
# https://github.com/actions/runner-images/issues/13964
1213
runs-on: ubuntu-26.04
14+
1315
steps:
14-
- uses: actions/checkout@v3
16+
# Cache apt
17+
- name: Cache apt
18+
uses: actions/cache@v4
1519
with:
16-
submodules: recursive
20+
path: /var/cache/apt/archives
21+
key: apt-cache-${{ runner.arch }}
1722

18-
- uses: actions/setup-node@v3
23+
# Cache Flatpak
24+
- name: Cache Flatpak dependencies
25+
uses: actions/cache@v4
1926
with:
20-
node-version: 20
21-
cache: "npm"
27+
path: ~/.local/share/flatpak
28+
key: flatpak-deps-${{ runner.arch }}
29+
30+
# Cache flatpak-builder state
31+
- name: Cache .flatpak-builder
32+
uses: actions/cache@v4
33+
with:
34+
path: .flatpak-builder
35+
key: flatpak-builder-${{ runner.arch }}
36+
37+
# Cache Foundry
38+
- name: Cache .foundry
39+
uses: actions/cache@v4
40+
with:
41+
path: .foundry
42+
key: foundry-${{ runner.arch }}
2243

2344
- name: Install host dependencies
2445
run: |
25-
sudo apt-get update
26-
sudo apt-get install flatpak mutter flatpak-builder foundry
46+
sudo apt-get -y update
47+
sudo apt-get -y install flatpak mutter flatpak-builder foundry
2748
28-
# Restore caches
29-
- name: Restore Flatpak dependencies
30-
uses: actions/cache/restore@v3
31-
with:
32-
path: ~/.local/share/flatpak
33-
key: ${{ runner.os }}-flatpak-dependencies-${{ github.run_id }}
34-
restore-keys: |
35-
${{ runner.os }}-flatpak-dependencies-
36-
- name: Restore .flatpak-builder
37-
uses: actions/cache/restore@v3
49+
- uses: actions/checkout@v4
3850
with:
39-
path: .flatpak-builder
40-
key: ${{ runner.os }}-flatpak-builder-${{ github.run_id }}
41-
restore-keys: |
42-
${{ runner.os }}-flatpak-builder-
43-
- name: Restore .foundry
44-
uses: actions/cache/restore@v3
51+
submodules: recursive
52+
53+
- uses: actions/setup-node@v4
4554
with:
46-
path: .foundry
47-
key: ${{ runner.os }}-foundry-${{ github.run_id }}
48-
restore-keys: |
49-
${{ runner.os }}-foundry-
55+
node-version: 24
56+
cache: "npm"
5057

5158
- run: mutter --wayland --no-x11 --headless --wayland-display=wayland-0 --virtual-monitor 1280x720 > /tmp/mutter.log 2>&1 &
5259
- run: make ci
5360
- run: cat /tmp/mutter.log
54-
55-
# Save caches
56-
- name: Save Flatpak dependencies
57-
uses: actions/cache/save@v3
58-
if: always()
59-
with:
60-
path: ~/.local/share/flatpak
61-
key: ${{ runner.os }}-flatpak-dependencies-${{ github.run_id }}
62-
- name: Save .flatpak-builder
63-
uses: actions/cache/save@v3
64-
if: always()
65-
with:
66-
path: .flatpak-builder
67-
key: ${{ runner.os }}-flatpak-builder-${{ github.run_id }}
68-
- name: Save .foundry
69-
uses: actions/cache/save@v3
70-
if: always()
71-
with:
72-
path: .foundry
73-
key: ${{ runner.os }}-foundry-${{ github.run_id }}

Makefile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ lint:
4646

4747
unit:
4848
foundry run -- gjs -m $(ROOT)/troll/tst/bin.js $(ROOT)/test/*.test.js
49-
#./build-aux/wip/run.js build-aux/re.sonny.Workbench.Devel.json -- gjs -m ./troll/tst/bin.js test/*.test.js
5049

5150
# https://github.com/ximion/appstream/issues/398#issuecomment-1129454985
5251
# flatpak run org.freedesktop.appstream.cli validate --override=release-time-missing=info --no-net data/app.metainfo.xml
@@ -60,12 +59,20 @@ unit:
6059

6160
test: unit lint
6261
foundry run -- workbench-cli ci $(ROOT)/demos/src/Welcome
63-
# ./build-aux/wip/run.js build-aux/re.sonny.Workbench.Devel.json -- workbench-cli ci demos/src/Welcome/
6462

65-
ci: setup build test
66-
# See Permissions.js
67-
# flatpak override --user --share=network --socket=pulseaudio --device=input re.sonny.Workbench.Devel
68-
foundry run -- workbench-cli ci $(ROOT)/demos/src/*
63+
install:
64+
artifact=$$(foundry export \
65+
| grep -oE 'file://[^[:space:]]+' \
66+
| tail -n1 \
67+
| sed 's|^file://||'); \
68+
test -n "$$artifact" || { echo "No artifact found"; exit 1; }; \
69+
flatpak install --user --assumeyes "$$artifact"
70+
71+
ci: setup build test install
72+
# We install because foundry has no flag to override permissions
73+
# see Permissions.js for why we need them
74+
flatpak run --command="workbench-cli" --share=network --socket=pulseaudio --device=input --filesystem=$(ROOT) re.sonny.Workbench.Devel ci $(ROOT)/demos/src/*
75+
6976

7077
flatpak:
7178
flatpak run org.flatpak.Builder --ccache --force-clean flatpak build-aux/re.sonny.Workbench.Devel.json

data/app.metainfo.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@
4343
</screenshots>
4444
<content_rating type="oars-1.1" />
4545
<releases>
46-
<release version="50.0" date="2026-05-01">
46+
<release version="50.0" date="2026-06-02">
4747
<description translatable="no">
4848
<ul>
4949
<li>Use GNOME 50</li>
50-
<li>Fix runnng Rust projects</li>
50+
<li>Fix discarding/closing of sessions</li>
51+
<li>Fix running Rust demos</li>
5152
</ul>
5253
<p>Library:</p>
5354
<ul>

package-lock.json

Lines changed: 2 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Previewer/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
executable('workbench-previewer-module',
22
'previewer.vala',
3-
dependencies: [ dependency('gtksourceview-5'), dependency('gmodule-2.0'), dependency('libadwaita-1'), dependency('shumate-1.0'), dependency('webkitgtk-6.0'), libworkbench_vapi ],
3+
dependencies: [ dependency('gtksourceview-5'), dependency('gmodule-2.0'), dependency('libadwaita-1'), dependency('glycin-2'), dependency('shumate-1.0'), dependency('webkitgtk-6.0'), libworkbench_vapi ],
44
# vala_args: [ '--gresourcesdir=' + meson.current_build_dir() ],
55
install: true,
66
link_with: libworkbench,

src/cli/blueprint.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@ import { getLanguage } from "../common.js";
66
import { parse } from "../langs/xml/xml.js";
77
import { LSPError } from "../lsp/LSP.js";
88
import { checkFile, diagnose } from "./util.js";
9+
import { ignore_codes } from "../langs/blueprint/blueprint.js";
910

1011
const languageId = "blueprint";
1112

13+
// No replacements yet
14+
const ignore_messages = [
15+
"Gtk.ShortcutsShortcut is deprecated\nhint: This widget will be removed in GTK 5",
16+
"Gtk.ShortcutLabel is deprecated\nhint: This widget will be removed in GTK 5",
17+
"Gtk.ShortcutsWindow is deprecated\nhint: This widget will be removed in GTK 5",
18+
"Gtk.ShortcutsGroup is deprecated\nhint: This widget will be removed in GTK 5",
19+
"Gtk.ShortcutsSection is deprecated\nhint: This widget will be removed in GTK 5",
20+
];
21+
1222
export default async function blueprint({ file, lspc }) {
1323
print(` ${file.get_path()}`);
1424

@@ -17,14 +27,9 @@ export default async function blueprint({ file, lspc }) {
1727
lspc,
1828
languageId,
1929
filter(diagnostic) {
20-
// No replacements yet
21-
return ![
22-
"Gtk.ShortcutsShortcut is deprecated\nhint: This widget will be removed in GTK 5",
23-
"Gtk.ShortcutLabel is deprecated\nhint: This widget will be removed in GTK 5",
24-
"Gtk.ShortcutsWindow is deprecated\nhint: This widget will be removed in GTK 5",
25-
"Gtk.ShortcutsGroup is deprecated\nhint: This widget will be removed in GTK 5",
26-
"Gtk.ShortcutsSection is deprecated\nhint: This widget will be removed in GTK 5",
27-
].includes(diagnostic.message);
30+
if (ignore_codes.includes(diagnostic.code)) return false;
31+
if (ignore_messages.includes(diagnostic.message)) return false;
32+
return true;
2833
},
2934
});
3035

src/cli/main.js

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import vala from "./vala.js";
2222
import python from "./python.js";
2323
import rust from "./rust.js";
2424
import { Interrupt } from "./util.js";
25+
import { isTypeScriptEnabled } from "../Extensions/Extensions.js";
2526

2627
GObject.type_ensure(Shumate.SimpleMap);
2728
GObject.type_ensure(WebKit.WebView);
@@ -102,16 +103,12 @@ const application = new Adw.Application();
102103
const window = new Adw.ApplicationWindow();
103104

104105
function createLSPClients({ root_uri }) {
106+
const langs = ["javascript", "blueprint", "css", "vala", "rust", "python"];
107+
if (isTypeScriptEnabled()) {
108+
langs.push("typescript");
109+
}
105110
return Object.fromEntries(
106-
[
107-
"javascript",
108-
"blueprint",
109-
"css",
110-
"vala",
111-
"rust",
112-
"python",
113-
"typescript",
114-
].map((id) => {
111+
langs.map((id) => {
115112
const lang = languages.find((language) => language.id === id);
116113
const lspc = createLSPClient({
117114
lang,
@@ -175,18 +172,20 @@ async function ci({ filenames }) {
175172
});
176173
}
177174

178-
const file_typescript = demo_dir.get_child("main.ts");
179-
if (file_typescript.query_exists(null)) {
180-
await typescript({
181-
file: file_typescript,
182-
lspc: lsp_clients.typescript,
183-
blueprint_object_ids,
184-
demo_dir,
185-
application,
186-
builder,
187-
template,
188-
window,
189-
});
175+
if (isTypeScriptEnabled()) {
176+
const file_typescript = demo_dir.get_child("main.ts");
177+
if (file_typescript.query_exists(null)) {
178+
await typescript({
179+
file: file_typescript,
180+
lspc: lsp_clients.typescript,
181+
blueprint_object_ids,
182+
demo_dir,
183+
application,
184+
builder,
185+
template,
186+
window,
187+
});
188+
}
190189
}
191190

192191
const file_vala = demo_dir.get_child("main.vala");

src/cli/vala.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ export default async function vala({ file, lspc, demo_dir }) {
4242
diagnostic.message !==
4343
"`Gtk.StyleContext' has been deprecated since 4.10"
4444
);
45+
} else if (demo_dir.get_basename() === "Drag and Drop") {
46+
// I don't see what else we can use
47+
// var icon = Gtk.DragIcon.get_for_drag(drag);
48+
return !["use `new' operator to create new objects"].includes(
49+
diagnostic.message,
50+
);
51+
} else if (demo_dir.get_basename() === "Shortcuts Window") {
52+
return ![
53+
"`Gtk.ShortcutsWindow' has been deprecated since 4.18",
54+
].includes(diagnostic.message);
4555
}
4656
return true;
4757
},

0 commit comments

Comments
 (0)