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

AssemblyLoader will now scan the deps file to find and load all assemblies referencing the lib at startup #249

Merged
merged 5 commits into from
Dec 16, 2024

Conversation

mpekurny
Copy link
Contributor

C# assembly loading is a lazy load strategy. When it loads the main assembly for an app, it loads only those assemblies it will need right away and then will load others as it needs them. Unfortunately, that means if your assembly includes another assembly that has steps which are only found through reflection, the second assembly may not be loaded right away and the initial scan will miss those step implementations causing your tests to fail. This change will attempt to read the deps file in the output directory, find all assemblies that have steps or hooks, and force them to load on startup. If the reading of the deps file fails, it will fall back on the old functionality of only loading the main app assembly.

…arp lib, even if they aren't initially loaded as a dependent of the primary app

Signed-off-by: Martin Pekurny <[email protected]>
@mpekurny
Copy link
Contributor Author

I see the problem with the failing tests. I will have a fix up as soon as I can.

@sriv sriv added the ReleaseCandidate Pr that is eligible for a release label Dec 16, 2024
@gaugebot
Copy link

gaugebot bot commented Dec 16, 2024

@mpekurny Thank you for contributing to gauge-dotnet. Your pull request has been labeled as a release candidate 🎉🎉.

Merging this PR will trigger a release.

Please bump up the version as part of this PR.

Instructions to bump the version can found at CONTRIBUTING.md

If the CONTRIBUTING.md file does not exist or does not include instructions about bumping up the version, please looks previous commits in git history to see what changes need to be done.

@sriv sriv merged commit 6492d52 into getgauge:master Dec 16, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReleaseCandidate Pr that is eligible for a release
Development

Successfully merging this pull request may close these issues.

2 participants