Skip to content

Avoid top-level await#37272

Merged
wxiaoguang merged 1 commit into
go-gitea:mainfrom
wxiaoguang:fix-top-await
Apr 18, 2026
Merged

Avoid top-level await#37272
wxiaoguang merged 1 commit into
go-gitea:mainfrom
wxiaoguang:fix-top-await

Conversation

@wxiaoguang
Copy link
Copy Markdown
Contributor

No description provided.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 18, 2026
@wxiaoguang wxiaoguang added the backport/v1.26 This PR should be backported to Gitea 1.26 label Apr 18, 2026
@wxiaoguang wxiaoguang changed the title Fix top-level await Avoid top-level await Apr 18, 2026
wxiaoguang added a commit to wxiaoguang/gitea that referenced this pull request Apr 18, 2026
@wxiaoguang wxiaoguang added backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Apr 18, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 18, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 18, 2026
@wxiaoguang wxiaoguang merged commit cf3f8e8 into go-gitea:main Apr 18, 2026
26 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone Apr 18, 2026
@wxiaoguang wxiaoguang deleted the fix-top-await branch April 18, 2026 08:02
wxiaoguang added a commit that referenced this pull request Apr 18, 2026
Backport

* #37233
* #37272

---------

Co-authored-by: silverwind <me@silverwind.io>
@silverwind
Copy link
Copy Markdown
Member

Double import can't be the final solution. We should research "manifest parser's bug" but I still don't know exactly what that bug actually is.

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

Double import can't be the final solution. We should research "manifest parser's bug" but I still don't know exactly what that bug actually is.

Where is the "double import"?

@silverwind
Copy link
Copy Markdown
Member

'../../../css/swagger-render.css' is imported twice, that is a double in my eyes.

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

'../../../css/swagger-render.css' is imported twice, that is a double in my eyes.

No, they aren't.

The first import only tells vite about the dependency, it doesn't really import anything. Still I think you need to take a look at how "manifest.json" and "import css" works

@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 18, 2026

Importing CSS in vite causes it to insert that CSS into <head> I think. It's definitely not only "tell vite about dependency". Vite may depdupe it, not sure.

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

Importing CSS in vite causes it to insert that CSS into <head> I think. It's definitely not only "tell vite about dependency". Vite may depdupe it, not sure.

Can you just don't "guess" or "imagine"? If what you "think" is right, how would you explain this "duplicate" import? Do you mean that "index.css" is imported twice?

Can you really spend some time on studying and learning? Why each time I have to waste so much time on the facts.

image image

@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 18, 2026

That's not a guess, that is my experience from working with vite since ~5 years. I just don't have motivation to read vite source code right now.

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

wxiaoguang commented Apr 18, 2026

That's not a guess, that is my experience from working with vite since ~5 years.

Fine, explain the "index.css" "double import", it was written by you.

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

. I just don't have motivation to read vite source code right now.

So you have motivation to keep wasting my time?

zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 20, 2026
* main: (25 commits)
  Add WebKit to e2e test matrix (go-gitea#37298)
  Don't add useless labels which will bother changelog generation (go-gitea#37267)
  Fix Repository transferring page (go-gitea#37277)
  Stabilize issue-project e2e test, increase timeout factor (go-gitea#37297)
  Fix Mermaid diagrams failing when node labels contain line breaks (go-gitea#37296)
  Add project column picker to issue and pull request sidebar (go-gitea#37037)
  Fix container auth for public instance (go-gitea#37290)
  Refactor frontend `tw-justify-between` layouts to `flex-left-right` (go-gitea#37291)
  Update Nix flake (go-gitea#37284)
  Workflow Artifact Info Hover (go-gitea#37100)
  [skip ci] Updated translations via Crowdin
  release notes for 1.26.0 (go-gitea#37282)
  Enhance GetActionWorkflow to support fallback references (go-gitea#37189)
  Refactor LDAP tests (go-gitea#37274)
  Remove `SubmitEvent` polyfill (go-gitea#37276)
  Upgrade go-git to v5.18.0 (go-gitea#37268)
  Avoid top-level await (go-gitea#37272)
  Frontend iframe renderer framework: 3D models, OpenAPI (go-gitea#37233)
  pull: Fix CODEOWNERS absolute path matching. (go-gitea#37244)
  Swift registry metadata: preserve more JSON fields and accept empty metadata (go-gitea#37254)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.26 This PR should be backported to Gitea 1.26 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants