Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

fix: use CARGO_MANIFEST_DIR as root for relative paths in abigen! #631

Merged
merged 3 commits into from
Nov 29, 2021

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Nov 29, 2021

Motivation

currently the working directory is used for relative paths in abigen, however rustc makes no guarantees about the current directory when it is running a procedural macro, this also differs when tests are run.

Solution

use CARGO_MANIFEST_DIR as the default root for relative paths, but keep the fallback for current dir.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@gakonst gakonst merged commit f6e803b into gakonst:master Nov 29, 2021
@mattsse mattsse mentioned this pull request Nov 29, 2021
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants