Skip to content

Commit 0d7f893

Browse files
committed
v50 fixes
1 parent eddddd6 commit 0d7f893

10 files changed

Lines changed: 154 additions & 59 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
name: CI
22

3-
# See also https://github.com/flatpak/flatpak-github-actions
4-
53
on:
64
pull_request:
75
branches: [main]
86
workflow_dispatch:
97

108
jobs:
119
CI:
12-
runs-on: ubuntu-26.04
10+
runs-on: ubuntu-latest
11+
12+
env:
13+
FOUNDRY_DIR: ${{ github.workspace }}/.foundry
14+
1315
steps:
1416
- uses: actions/checkout@v3
1517
with:
@@ -20,26 +22,57 @@ jobs:
2022
node-version: 20
2123
cache: "npm"
2224

25+
# -----------------------------
26+
# System dependencies
27+
# -----------------------------
2328
- name: Install host dependencies
2429
run: |
2530
sudo apt-get update
26-
sudo apt-get install flatpak mutter flatpak-builder foundry
31+
sudo apt-get install -y \
32+
flatpak flatpak-builder mutter \
33+
git meson ninja-build gcc pkg-config \
34+
libglib2.0-dev libgtk-4-dev
35+
36+
# -----------------------------
37+
# Build GNOME Foundry from source (Option B)
38+
# -----------------------------
39+
- name: Clone and build GNOME Foundry
40+
run: |
41+
if [ ! -d "$FOUNDRY_DIR/install/bin" ]; then
42+
echo "Building Foundry from source..."
43+
44+
git clone https://gitlab.gnome.org/GNOME/foundry.git "$FOUNDRY_DIR/src"
45+
46+
meson setup "$FOUNDRY_DIR/build" "$FOUNDRY_DIR/src" \
47+
--prefix="$FOUNDRY_DIR/install"
48+
49+
ninja -C "$FOUNDRY_DIR/build"
50+
ninja -C "$FOUNDRY_DIR/build" install
51+
else
52+
echo "Foundry already built (cache hit)"
53+
fi
2754
55+
echo "$FOUNDRY_DIR/install/bin" >> $GITHUB_PATH
56+
57+
# -----------------------------
2858
# Restore caches
59+
# -----------------------------
2960
- name: Restore Flatpak dependencies
3061
uses: actions/cache/restore@v3
3162
with:
3263
path: ~/.local/share/flatpak
3364
key: ${{ runner.os }}-flatpak-dependencies-${{ github.run_id }}
3465
restore-keys: |
3566
${{ runner.os }}-flatpak-dependencies-
67+
3668
- name: Restore .flatpak-builder
3769
uses: actions/cache/restore@v3
3870
with:
3971
path: .flatpak-builder
4072
key: ${{ runner.os }}-flatpak-builder-${{ github.run_id }}
4173
restore-keys: |
4274
${{ runner.os }}-flatpak-builder-
75+
4376
- name: Restore .foundry
4477
uses: actions/cache/restore@v3
4578
with:
@@ -48,23 +81,38 @@ jobs:
4881
restore-keys: |
4982
${{ runner.os }}-foundry-
5083
51-
- run: mutter --wayland --no-x11 --headless --wayland-display=wayland-0 --virtual-monitor 1280x720 > /tmp/mutter.log 2>&1 &
84+
# -----------------------------
85+
# Headless GNOME runtime
86+
# -----------------------------
87+
- run: |
88+
mutter --wayland --no-x11 --headless \
89+
--wayland-display=wayland-0 \
90+
--virtual-monitor 1280x720 > /tmp/mutter.log 2>&1 &
91+
92+
# -----------------------------
93+
# CI
94+
# -----------------------------
5295
- run: make ci
96+
5397
- run: cat /tmp/mutter.log
5498

99+
# -----------------------------
55100
# Save caches
101+
# -----------------------------
56102
- name: Save Flatpak dependencies
57103
uses: actions/cache/save@v3
58104
if: always()
59105
with:
60106
path: ~/.local/share/flatpak
61107
key: ${{ runner.os }}-flatpak-dependencies-${{ github.run_id }}
108+
62109
- name: Save .flatpak-builder
63110
uses: actions/cache/save@v3
64111
if: always()
65112
with:
66113
path: .flatpak-builder
67114
key: ${{ runner.os }}-flatpak-builder-${{ github.run_id }}
115+
68116
- name: Save .foundry
69117
uses: actions/cache/save@v3
70118
if: always()

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>Show dialog when network permission is missing for running Rust</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)