Skip to content

Open missing source file errors on GitHub#112759

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
KoBeWi:GitHubization_of_the_editor
Apr 27, 2026
Merged

Open missing source file errors on GitHub#112759
Repiteo merged 1 commit into
godotengine:masterfrom
KoBeWi:GitHubization_of_the_editor

Conversation

@KoBeWi

@KoBeWi KoBeWi commented Nov 14, 2025

Copy link
Copy Markdown
Member

Follow-up to #111805

That PR didn't properly handle missing files. This PR makes the editor try to open them on GitHub.

It would be helpful if official builds came with some prefix for source paths, it would be easier to differentiate them from actually missing files in custom builds. The way I did it might be unreliable and try to open non-existent files.

@KoBeWi KoBeWi added this to the 4.6 milestone Nov 14, 2025
@KoBeWi KoBeWi requested a review from a team November 14, 2025 13:01
Comment thread editor/editor_log.cpp Outdated
@KoBeWi KoBeWi force-pushed the GitHubization_of_the_editor branch from a9a9bb3 to 4fb64a4 Compare November 18, 2025 15:07

@Calinou Calinou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it doesn't seem to work on my end:

  • If I keep the compiled binary in the source repository, it will open the source file in the external editor as intended.
  • If I move the compiled binary out of the source repository, it will create a new file named after the last component of the path in the external editor (e.g. variant_utility.cpp for an error in ./core/variant/variant_utility.cpp:1024).

This presumably occurs because the path.begins_with("./") check applies even if the file doesn't exist.

Tested using this code (save it and use Scene > Reload Saved Scene, or restart the editor):

@tool
extends Node

func _ready() -> void:
	push_error("test")
@KoBeWi

KoBeWi commented Nov 18, 2025

Copy link
Copy Markdown
Member Author

Should be fixed now.
Non-existent absolute paths will result in opening invalid GitHub page though, not sure if it can be fixed easily.

@akien-mga akien-mga requested a review from Calinou December 19, 2025 09:49
Comment thread editor/editor_log.cpp
Comment thread editor/editor_log.cpp Outdated
@KoBeWi KoBeWi force-pushed the GitHubization_of_the_editor branch from 4fb64a4 to 6d74b99 Compare December 19, 2025 14:13
@KoBeWi KoBeWi force-pushed the GitHubization_of_the_editor branch from 6d74b99 to a1a6aae Compare December 19, 2025 16:26
@akien-mga akien-mga modified the milestones: 4.6, 4.x Jan 13, 2026
@Repiteo Repiteo requested a review from a team as a code owner February 17, 2026 20:10

@YeldhamDev YeldhamDev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works properly on my end. And I think it's fine to merge now, since currently clicking on the file links opens a non-existing webpage.

@YeldhamDev YeldhamDev modified the milestones: 4.x, 4.7 Apr 23, 2026
@Repiteo Repiteo merged commit dc7e940 into godotengine:master Apr 27, 2026
20 checks passed
@Repiteo

Repiteo commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@KoBeWi KoBeWi deleted the GitHubization_of_the_editor branch April 27, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment