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: normalizes path in remapping keys [APE-849] #96

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

vzotova
Copy link
Contributor

@vzotova vzotova commented Apr 17, 2023

to match delimiters in configuration and path on the system (fixes issue with compilation on windows)

What I did

Added path normalization for key in ImportRemappingBuilder which fixes compilation on Windows with remappings

fixes: #

How I did it

for key, value in import_remapping.items():
                if key not in source_id_value:
                    continue

import_remapping dict contains configuration data when source_id_value is path on the system. If delimiters are different between configuration and system path then it will always skip remapping. Solution is to normalize remapping keys.

I'm not sure about perfect place for those changes. I'll be glad to put wherever it fits better

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@NotPeopling2day NotPeopling2day changed the title fix: normalizes path in remapping keys fix: normalizes path in remapping keys [APE-849] Apr 17, 2023
antazoey
antazoey previously approved these changes Apr 18, 2023
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

Thanks for your contributions.

One question:
Are you really able to use Ape on Windows? What type of shell are you using?

ape_solidity/_utils.py Show resolved Hide resolved
…ration and path on the system (fixes issue with compilation on windows)
@vzotova
Copy link
Contributor Author

vzotova commented Apr 18, 2023

One question: Are you really able to use Ape on Windows? What type of shell are you using?

Almost did, with that change and another small change in main ape repo that was included already I can compile and run tests/scripts. One thing that is not working properly: clean compile ape compile -f because cache directory is not creating. I saw once same in Linux too so if you have ideas where to look - would be great.
Regarding shell: I'm using wrapper around system cmd - Cmder

@NotPeopling2day NotPeopling2day merged commit 6f52e59 into ApeWorX:main Apr 18, 2023
@NotPeopling2day
Copy link
Contributor

Thank you for your contribution!

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.

3 participants