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

Cannot publish ethpm package with dependencies #699

Closed
alex-miller-0 opened this issue Dec 4, 2017 · 7 comments
Closed

Cannot publish ethpm package with dependencies #699

alex-miller-0 opened this issue Dec 4, 2017 · 7 comments

Comments

@alex-miller-0
Copy link
Contributor

Issue

Publishing an ethpm package (truffle publish) works nicely with self-contained contracts (i.e. those that do not import any other contracts), but I can't get it to work with contract imports.

Steps to Reproduce

I am importing a Token contract here:

import "./Token.sol"; 

Note: importing from an ethpm install (i.e. import "tokens/Token.sol") has the same effect.

I instantiate a token in a function call here:

Token t;
t = Token(tokenAddress);

truffle compile, truffle migrate, and truffle deploy all work fine.

Expected Behavior

truffle publish should publish this package to ethpm

Actual Results

I get the following error:

ParsedContract.sol:64:5: DeclarationError: Identifier not found or not unique.
    Token t;
    ^---^

Environment

  • Operating System: OSX
  • Truffle version: 4.0.1
  • Ethereum client: INFURA (ropsten)
  • node version: 8.6.0
  • npm version: 5.3.0
@Vourhey
Copy link

Vourhey commented Dec 26, 2017

I'm having the same error! Still no response?
as OP said compile works fine, but it's impossible to publish

Kubuntu 16.04
Truffle v4.0.4 (core: 4.0.4)
Solidity v0.4.18 (solc-js)

@frangio
Copy link
Contributor

frangio commented Mar 23, 2018

We're getting the same error in the OpenZeppelin repository. It started happening around version 1.4.0.

Does anyone from the Truffle team have any clue as to what could be happening?

@cgewecke
Copy link
Contributor

cgewecke commented Mar 23, 2018

@frangio Are you seeing this when trying publish Zeppelin itself, or when trying to publish something that imports contracts from an npm installed Zeppelin? Or from ethpm installed Zeppelin?

There is a recent fix for this that's pending release (early next week) but it really only addresses the case of contracts that rely on ethpm dependencies.

If you have reproduction steps for the Zeppelin case, will investigate.

@frangio
Copy link
Contributor

frangio commented Mar 23, 2018

When trying to publish OpenZeppelin itself. Can you try running truffle publish on the OpenZeppelin/zeppelin-solidity repo on your machine and see if that fails?

@cgewecke
Copy link
Contributor

@frangio Yes I can see it failing and see why in the code as well. We'll try to fix this ASAP, thanks for pinging this.

@frangio
Copy link
Contributor

frangio commented Mar 23, 2018

@cgewecke Thanks to you for the quick response as always! ♥️

@cgewecke
Copy link
Contributor

@alex-miller-0 @frangio This should be fixed in 4.1.5. Please report back if you continue to see this or have other issues publishing to ethpm.

Thanks!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants