This upgrade does not include any breaking changes for Discourse
themes/plugins. Two of the three deprecations in Ember 6 (array
prototype extensions, component-template resolution) have already been
polyfilled in Discourse. The third (action helper/modifier) is
polyfilled in this commit.
Performance testing shows a 2-3% improvement in Discourse rendering
time, thanks to upstream performance fixes in the glimmer-vm since the
regressions in the Ember 5.x series.
---------
Co-authored-by: David Taylor <david@taylorhq.com>
Shortened AI agent file, so we conserve tokens
Use symlinks for all agent files where needed to avoid round trips to
llm
Added config for Open AI Codex / Gemini and Cursor
This github workflow is now part of the pipeline to tests-passed, so we
need to run it on every commit that lands. We can continue skipping
tests for PRs that only touch certain paths
This job only runs on `main`, so we don't want to cancel existing runs
when new commits land. This config now matches the behavior of
`tests.yml` on `main`
Building the Discourse ember app is resource-intensive process. This
commit introduces a framework for us to build these assets centrally,
and make them available for people to download.
On every commit to `main`, a new GitHub actions workflow will build
development & production versions of the core assets, and publish them
as a github release under the `discourse/discourse-assets` repository. A
separate repository is being used to avoid polluting the main
`discourse/discourse` repository with one-git-tag-per-release.
The `assemble_ember_build.rb` script is updated to fetch the relevant
asset bundle. Requests are made to `get.discourse.org`, which then
redirects to GitHub releases. This redirection service is being used so
that we have the option to switch away from GitHub releases in future
without breaking existing Discourse installations.
For now, this behavior can be enabled by setting
`DISCOURSE_DOWNLOAD_PRE_BUILT_ASSETS=1`. In the near future, we hope to
make this the default, with opt-out via
`DISCOURSE_DOWNLOAD_PRE_BUILT_ASSETS=0`.
This commit is a complete reimplementation of our theme JS compilation
system.
Previously, we compiled theme JS into AMD `define` statements on a
per-source-file basis, and then concatenated them together for the
client. These AMD modules would integrate with those in Discourse core,
allowing two way access between core/theme modules. Going forward, we'll
be moving away from AMD, and towards native ES modules in core. Before
we can do that, we need to stop relying on AMD as the 'glue' between
core and themes/plugins.
This change introduces Rollup (running in mini-racer) as a compiler for
theme JS. This is configured to generate a single ES Module which
exports a list of 'compat modules'. Core `import()`s the modules for
each active theme, and adds them all to AMD. In future, this consumption
can be updated to avoid AMD entirely.
All module resolution within a theme is handled by Rollup, and does not
use AMD.
Import of core/plugin modules from themes are automatically transformed
into calls to a new `window.moduleBroker` interface. For now, this is a
direct interface to AMD. In future, this can be updated to point to real
ES Modules in core.
Despite the complete overhaul of the internals, this is not a breaking
change, and should have no impact on existing themes. If any
incompatibilities are found, please report them on
https://meta.discourse.org.
---------
Co-authored-by: Jarek Radosz <jarek@cvx.dev>
Co-authored-by: Chris Manson <chris@manson.ie>
- Migrated from annotate to annotaterb as the former is not maintained
anymore.
- Dropped our `fast_pluck` patch as the default `pluck` implementation
seems now faster.
Previously, running qunit tests for a plugin would load the JS of all
installed plugins. This can be problematic because, depending on the
plugins installed in the current environment, there can be unexpected
interactions between the plugins.
This commit updates our qunit system to check the
`tests.requiredPlugins` list from the theme/plugin `about.json` file,
and only loads the listed plugins. This means that the environment is
much more consistent across CI and different development environments.
Alongside that change, this commit also:
- Starts storing the original `about.json` for themes in the database
- Improves qunit error handling when the test environment fails to boot
(e.g. there's a bad import in a plugin)
- Restores plugin CSS in theme qunit tests
1. Use separate caches for plugins and core
2. Don't load plugins in non-plugin jobs
3. Propagate LOAD_PLUGINS to all steps
4. Check annotations of plugin models
5. Update outdated annotations
Seeing the following in
https://github.com/discourse/discourse/actions/runs/16209614945/job/45767099809?pr=33577
```
The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api
Error: HttpError: You do not have permission to create labels on this repository.: {"resource":"Repository","field":"label","code":"unauthorized"}
Error: You do not have permission to create labels on this repository.: {"resource":"Repository","field":"label","code":"unauthorized"}
```
Related: https://github.com/orgs/community/discussions/156181