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

Add -p and --workspace flags for contract workspaces #1147

Closed
wants to merge 52 commits into from

Conversation

ltfschoen
Copy link

@ltfschoen ltfschoen commented Jun 6, 2023

Relates to:

Usage

  • Clone this branch
mkdir -p ~/code/cargo-contract/
cd ~/code/cargo-contract/
git clone https://github.com/ltfschoen/cargo-contract
cd cargo-contract/
git fetch origin bar-new-flags:bar-new-flags
git checkout bar-new-flags
  • Create a separate empty folder elsewhere.
mkdir -p ~/code/preview/
cd ~/code/cargo-contract/
cargo build
  • Copy across the binary into the Delegator Example workspace
cp ~/code/cargo-contract//target/debug/cargo-contract ~/preview/delegator
  • Build Delegator Example with the built binary. It may be necessary to install some dependencies and set some environment variables as shown below on macOS.
cd ~/preview/delegator
cargo install cargo-dylint dylint-link
echo 'export PATH="$PATH:$HOME/.cargo/bin"' >> "${HOME}/.bashrc"
source "${HOME}/.bashrc"
export RUSTUP_TOOLCHAIN=stable
./cargo-contract contract build --workspace

Progress: Currently running the above outputs the below clang: error: no input files. I tried this on macOS and thought it was due to old developer tools, but I also tried using a Docker container with Debian 11 and got similar error, and also used a cloud service with fresh Ubuntu and same error.

 Building contract: accumulator [1/4]
 [1/6] Checking ink! linting rules
Detected cargo-dylint binary...

Detected dylint-link binary...

Usage: cargo-dylint <COMMAND>

Commands:
  dylint  
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help
clang: error: no input files
Error: command failed: "cc"

@cmichi
Copy link
Collaborator

cmichi commented Feb 27, 2024

I'm closing the PR due to staleness and the cargo-contract master having moved on significantly since the PR was created. Feel free to reopen based on the latest master in case you're interested in continuing work on it!

@cmichi cmichi closed this Feb 27, 2024
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.

4 participants