Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect and Warn if modder is debugging or building a mod that won't be selected to load due to version number #4181

Open
JavidPack opened this issue Apr 26, 2024 · 1 comment · May be fixed by #4206
Labels
Feature - Modder Experience Request for new modding functionality (non-hook) Requestor-Modders Issues or PRs adding or fixing TML modder API

Comments

@JavidPack
Copy link
Collaborator

Version

Latest 1.4.4-stable

OS

Windows

Platform

Steam

This bug affects...

Mod capability as a Modder

Description

Sometimes a modder will clone a mod git and try to debug, only to be confused as their changes do not take effect. The latest report of this is a modder cloning the main branch that had 0.6 as the build, but steam had a 0.6.1.1 version published. This is either because the author had not pushed some local changes yet or the changes to build.txt were on another branch.

This also happens for modders confused about Version, for example a modders changing v0.200 to v0.3, thinking it is a higher version.

It would be useful to warn of this issue. It might be possible to to detect this when debugging directly. If not, build and reload could warn of this issue. The warning should be full page, as this is definitely a mistake and probably never intentional.

Log File

No response

Steps to reproduce

No response

Expected Behavior

No response

Actual Behavior

No response

Reproduction frequency

No response

Additional Information

No response

@JavidPack JavidPack added the NEW ISSUE Flags an Issue as new. To be removed once issue is assessed. label Apr 26, 2024
@github-actions github-actions bot added the Requestor-Modders Issues or PRs adding or fixing TML modder API label Apr 26, 2024
@JavidPack JavidPack changed the title Detect and Warn if modder is debugging a mod that won't be selected to load due to version Detect and Warn if modder is debugging or building a mod that won't be selected to load due to version number Apr 26, 2024
@JavidPack JavidPack added Feature - Modder Experience Request for new modding functionality (non-hook) and removed NEW ISSUE Flags an Issue as new. To be removed once issue is assessed. labels Apr 26, 2024
@Chicken-Bones
Copy link
Member

AssemblyManager uses the following code to support debugging mods with edit and continue. We could pull the condition into LocalMod.

Note that if the user is the one that published the mod, and the published version was built via VS, the workshop mod may also have a pdb in the eac path.

I'm not sure there's an easy way to detect if the supplied symbols don't match in that case, but we could also use file creation date . If the local copy is debuggable, and has a newer creation date than the workshop one, and isn't selected...

					assembly = Debugger.IsAttached && File.Exists(properties.eacPath) ?
						LoadAssembly(modFile.GetModAssembly(), File.ReadAllBytes(properties.eacPath)): //load the unmodified dll and EaC pdb
						LoadAssembly(modFile.GetModAssembly(), modFile.GetModPdb());

@JavidPack JavidPack linked a pull request May 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature - Modder Experience Request for new modding functionality (non-hook) Requestor-Modders Issues or PRs adding or fixing TML modder API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants