Skip to content

Commit 1ac7ab7

Browse files
committed
Merge branch 'release-v3.0.0-pre.0' into release
2 parents ad3361a + c0f4b10 commit 1ac7ab7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1539
-3657
lines changed

.circleci/config.yml

Lines changed: 24 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -147,46 +147,6 @@ jobs:
147147
command: |
148148
export PATH=.:$PATH && npm --prefix ./samples/node run test
149149
150-
sample-qt-test:
151-
docker:
152-
- image: cimg/python:<< pipeline.parameters.python-version >>
153-
steps:
154-
- checkout
155-
- install-node
156-
- run:
157-
name: Install JavaScript dependencies for Glean
158-
command: npm --prefix ./glean install
159-
- run:
160-
name: Install Qt dependencies
161-
command: |
162-
sudo apt-get update
163-
sudo apt-get install -y gcc g++ make cmake \
164-
qtbase5-dev qt5-default qt5-qmake qttools5-dev-tools qtdeclarative5-dev \
165-
qtdeclarative5-dev-tools qml-module-qttest qml-module-qtquick2 \
166-
qml-module-qtquick-localstorage qml-module-qtquick-controls2
167-
sudo apt-get install xvfb
168-
- run:
169-
name: Build and install Qt Glean.js library
170-
command: |
171-
npm --prefix ./glean run build:qt
172-
cp -r glean/dist/qt/org/ samples/qt/src/App/org/
173-
- run:
174-
name: Build the Node.js Glean generated files sample
175-
command: |
176-
cd samples/qt
177-
python3 -m venv venv
178-
source venv/bin/activate
179-
pip install -r requirements.txt
180-
glean_parser translate src/App/metrics.yaml src/App/pings.yaml \
181-
-f javascript -o src/App/generated \
182-
--option platform=qt --option version="2.0"
183-
- run:
184-
name: Run Qt sample tests
185-
command: |
186-
cd samples/qt
187-
qmake -r
188-
QML_IMPORT_TRACE=1 xvfb-run make check
189-
190150
browser-compat-smoke-tests:
191151
docker:
192152
- image: cimg/python:<< pipeline.parameters.python-version >>
@@ -253,9 +213,30 @@ jobs:
253213
- run:
254214
name: NPM Authentication
255215
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > glean/.npmrc
256-
- run:
257-
name: Publish to npm
258-
command: export PATH=.:$PATH && (cd glean && npm publish --access public)
216+
# This conditional matches the tag that contains 'pre', used
217+
# to mark prerelease builds. Since CircleCI conditionals do
218+
# not directly support 'else's, we need another conditional.
219+
- when:
220+
condition:
221+
matches:
222+
pattern: "^v.*-pre.*$"
223+
value: << pipeline.git.tag >>
224+
steps:
225+
- run:
226+
name: Publish to npm (prerelease)
227+
command: export PATH=.:$PATH && (cd glean && npm publish --access public --tag prerelease)
228+
# This conditional matches 'release': we won't tag the npm
229+
# release in this case, because no 'pre' is found in the tag.
230+
- when:
231+
condition:
232+
not:
233+
matches:
234+
pattern: "^v.*-pre.*$"
235+
value: << pipeline.git.tag >>
236+
steps:
237+
- run:
238+
name: Publish to npm
239+
command: export PATH=.:$PATH && (cd glean && npm publish --access public)
259240
- run:
260241
name: Get ghr release tool
261242
command: |
@@ -265,14 +246,6 @@ jobs:
265246
echo "${GHR_SHA256} *${GHR}.tar.gz" | sha256sum -c -
266247
tar -xf "${GHR}.tar.gz"
267248
cp ./${GHR}/ghr ghr
268-
- run:
269-
name: Publish to Github
270-
command: |
271-
# Attach Qt build to release
272-
npm --prefix ./glean install
273-
npm --prefix ./glean run build:qt
274-
tar -zcvf "glean/dist/glean_js-${CIRCLE_TAG}-qt.tar.gz" glean/dist/qt
275-
./ghr -u mozilla -replace ${CIRCLE_TAG} glean/dist/glean_js-${CIRCLE_TAG}-qt.tar.gz
276249
277250
workflows:
278251
ci:
@@ -291,9 +264,6 @@ workflows:
291264
- sample-node-test:
292265
requires:
293266
- test
294-
- sample-qt-test:
295-
requires:
296-
- test
297267
- hold:
298268
type: approval
299269
requires:
@@ -302,7 +272,6 @@ workflows:
302272
- test
303273
- sample-webext-test
304274
- sample-node-test
305-
- sample-qt-test
306275
filters:
307276
branches:
308277
ignore:

.dictionary

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ md
6161
mdroettboom
6262
mozilla
6363
npm
64+
prerelease
6465
runtime
6566
schemas
6667
setRawNanos

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"--experimental-modules",
8989
"--experimental-specifier-resolution=node",
9090
"--loader=ts-node/esm",
91-
"${workspaceFolder}/glean/tests/unit/core/metrics/timing_distribution.spec.ts"
91+
"${file}"
9292
],
9393
"console": "integratedTerminal"
9494
}

ARCHITECTURE.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ storage. Each metric can have different [lifetimes](https://mozilla.github.io/gl
4040
and the SDK will manage its storage so that data does not remain in storage after it's lifetime is expired.
4141

4242
The Glean SDK tries to do all of this is the least disruptive way possible to users. There are two separate
43-
implementations for the SDK based on the platform: async (QT, node, web extensions) and sync (browser). The implementation
43+
implementations for the SDK based on the platform: async (node, web extensions) and sync (browser). The implementation
4444
is set inside of Glean itself and is not configurable by the user.
4545

46-
### async (Web Extensions, QT, Node)
46+
### async (Web Extensions, Node)
4747

4848
All of the SDKs tasks are queued and executed asynchronously. The APIs exposed by the Glean SDK will only do
4949
the en-queuing of tasks, a quick synchronous operation. Internally, the Glean SDK will handle the
@@ -110,13 +110,6 @@ file that they are getting and not `core/glean.ts`.
110110
The main difference between each platform's file is that a different `Platform` implementation is
111111
imported per file.
112112

113-
The Qt/QML entry point is the different one here. QML packages cannot be easily consumed through npm,
114-
so the QML entry point imports all of Glean's modules and exposes it through this entry point. That is
115-
what is done on the `qt.ts` file. The `qt.js` file is the file QML users actually interact with,
116-
it includes specific QML semantics and is copied to the final destination folder of the QML package
117-
as-is after Glean.js is compiled for the QML target. (See `bin/prepare-qml-module.sh` for more
118-
context.)
119-
120113
### `platform/`
121114

122115
Some modules such as storage and uploader, cannot be written in such a way that works
@@ -131,7 +124,6 @@ It also makes testing easier, because the exact same suite of tests can be run f
131124
The storage module varies for each platform. The storage mechanism used by each platform is as follows:
132125
- `web` - [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)
133126
- `webext` - [`storage`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage)
134-
- `QT` - [`QtQuick.LocalStorage`](https://doc.qt.io/qt-6/qtquick-localstorage-qmlmodule.html)
135127
- `Node` - None, everything is stored in memory
136128

137129
### `plugins/`

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Unreleased changes
22

3-
[Full changelog](https://github.com/mozilla/glean.js/compare/v2.0.5...main)
3+
[Full changelog](https://github.com/mozilla/glean.js/compare/v3.0.0-pre.0...main)
4+
5+
# v3.0.0-pre.0 (2023-11-10)
6+
7+
[Full changelog](https://github.com/mozilla/glean.js/compare/v2.0.5...v3.0.0-pre.0)
8+
9+
* [#1810](https://github.com/mozilla/glean.js/pull/1810): **BREAKING CHANGE**: Drop support for QT.
10+
* [#1811](https://github.com/mozilla/glean.js/pull/1811): Update `glean_parser` to `v10.0.3`.
411

512
# v2.0.5 (2023-10-16)
613

automation/package-lock.json

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

automation/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"author": "The Glean Team <glean-team@mozilla.com>",
2020
"license": "MPL-2.0",
2121
"devDependencies": {
22-
"@octokit/request": "^8.1.2",
23-
"browserstack-local": "^1.5.4",
22+
"@octokit/request": "^8.1.4",
23+
"browserstack-local": "^1.5.5",
2424
"geckodriver": "^4.2.1",
2525
"selenium-webdriver": "^4.4.0",
26-
"webpack": "^5.88.2",
26+
"webpack": "^5.89.0",
2727
"webpack-cli": "^5.1.4",
2828
"webpack-dev-server": "^4.15.1"
2929
}

automation/size/docs.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { fileURLToPath } from "url";
99
import {
1010
getCustomLibSize,
1111
formatBytes,
12-
getQtBundleSize,
1312
METRIC_TYPES,
1413
PLUGINS,
1514
PLATFORMS
@@ -67,8 +66,7 @@ try {
6766
const minSizesTable =
6867
`\n|| Size |\n`
6968
+ `|--|--|\n`
70-
+ `${PLATFORMS.map(platform => `|${platform}|**${sizes[platform].baseSize}**|`).join("\n")}\n`
71-
+ `|QML|**${formatBytes(getQtBundleSize())}**|\n`;
69+
+ `${PLATFORMS.map(platform => `|${platform}|**${sizes[platform].baseSize}**|`).join("\n")}\n`;
7270

7371
const createSizesTableHeader = title => {
7472
return `\n|${title}| ${PLATFORMS.map(platform => `${platform}|`).join("")}\n`

automation/size/report.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ import {
99
PLUGINS,
1010
getCustomLibSize,
1111
formatBytes,
12-
executeCmd,
13-
getQtBundleSize
12+
executeCmd
1413
} from "./utils.js";
1514

1615
async function buildStatsMap() {
17-
18-
const qtBundleStats = getQtBundleSize();
1916
return [
2017
{
2118
name: "Web Extension",
@@ -31,11 +28,6 @@ async function buildStatsMap() {
3128
name: "Node.js",
3229
max: await getCustomLibSize("node", METRIC_TYPES, PLUGINS),
3330
min: await getCustomLibSize("node")
34-
},
35-
{
36-
name: "Qt/QML",
37-
max: qtBundleStats,
38-
min: qtBundleStats
3931
}
4032
];
4133
}

automation/size/utils.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ export function executeCmd(cmd) {
8282
* Note: This function will use whatever `@mozilla/glean` package is linked at its runtime.
8383
*
8484
* @param {string} platform The platform to build for, supported platforms are: `web`, `webext` and `node`.
85-
* The Qt build always has the same size because it always includes everything in it,
86-
* so it is not supported here.
8785
* @param {[string]} metrics An array of metric types. Supported metrics types are listed in `METRIC_TYPES`.
8886
* If not provided the final bundle won't contain any additional metric types.
8987
* @param {[string]} plugins An array of plugins. Supported plugins are listed in `PLUGINS`.
@@ -146,18 +144,3 @@ export async function getCustomLibSize(platform, metrics = [], plugins = []) {
146144
);
147145
});
148146
}
149-
150-
/**
151-
* Gets the size of the Qt bundle directly from the Glean folder.
152-
*
153-
* Note: this function assumes the Qt bundle has been built over there.
154-
*
155-
* @returns The size in bytes of the Qt bundle.
156-
*/
157-
export function getQtBundleSize() {
158-
// The Qt bundle size is special, because the Qt build is not part of the @mozilla/glean npm package.
159-
// It is already bundled and distributed with each new release on the Github releases page.
160-
//
161-
// In Qt, the bundle always contains all metric types and plugins, so there is no min/max.
162-
return fs.statSync(path.resolve(__dirname, "../../glean/dist/qt/org/mozilla/Glean/glean.lib.js")).size;
163-
}

0 commit comments

Comments
 (0)