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

fix: recursive config failure on windows #767

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

stevenh
Copy link
Contributor

@stevenh stevenh commented Mar 12, 2024

Description

Fix failure with "package not found in config" on Windows due to use of backslash in package name instead of forward slash, resulting in the configuration for the sub package not being found.

Fixes: #727

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Version of Golang used when building/testing:

  • 1.22

How Has This Been Tested?

Tested on Windows machine to be able to successfully run mockery when given a recursive configuration, confirming we now don't get a failure.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

A unit test for this is not possible as it depends on the OS specific slash separator in used in library functions.

Fix failure with "package not found in config" on Windows due to
use of backslash in package name instead of forward slash, resulting
in the configuration for the sub package not being found.

Fixes: vektra#727
@stevenh stevenh marked this pull request as ready for review March 12, 2024 19:27
@LandonTClipp
Copy link
Collaborator

Great! I have not added windows to our testing matrix yet because of a lot of other issues I don't recall at the moment. That would be a good project for someone to tackle eventually.

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.61079%. Comparing base (8b86cf2) to head (426dc32).

Additional details and impacted files
@@                 Coverage Diff                 @@
##              master        #767         +/-   ##
===================================================
- Coverage   42.71105%   42.61079%   -0.10026%     
===================================================
  Files             63          63                 
  Lines           4987        4987                 
===================================================
- Hits            2130        2125          -5     
- Misses          2657        2662          +5     
  Partials         200         200                 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LandonTClipp LandonTClipp merged commit 9dd9b1e into vektra:master Mar 12, 2024
5 of 6 checks passed
@stevenh stevenh deleted the fix/windows-recursive branch March 12, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mockery doesn't work with local package
2 participants