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

git(source-scan): resolve conflicts with main #162

Merged
merged 7 commits into from
May 13, 2024

Conversation

dj8yfo
Copy link
Contributor

@dj8yfo dj8yfo commented May 10, 2024

commit ca13500 was lost in merge of #159, as it was accidentally not pushed to remote before merge,
which was discovered when testing on contract


SIDENOTE: commit 787c3a4 fixes somewhat unrelated problem, also present in main .
It can be cherry-picked into a standalone pr to main :

as cargo metadata is called without any additional args (--features or whatnot), the following diff:

-near-sdk = { version = "5.1.0", features = ["legacy"], git = "https://github.com/dj8yfo/near-sdk-rs.git", branch = "add_contract_metadata" }
+near-sdk = { version = "5.1.0", default-features = false, features = ["wee_alloc", "legacy"], git = "https://github.com/dj8yfo/near-sdk-rs.git", branch = "add_contract_metadata" }

results in

Error:
   0: `near-sdk` dependency must have the `abi` feature enabled

which somewhat contradicts no explicit abi feature , which is promoted for use by near-docs

encody and others added 3 commits May 3, 2024 19:32
Adds support for passing feature flags to `cargo`.

## Motivation

Smart contract developers will sometimes use [feature
flags](https://doc.rust-lang.org/cargo/reference/features.html#the-features-section)
to enable/disable certain portions of code during compilation (e.g.
enable certain debugging features for the testnet version which are not
available in the production version).

## Usage

```txt
cargo near build --features feat1,feat2
```

```txt
cargo near build --no-default-features
```

## Implementation Notes

It does no validation of the input received to the flag, transparently
forwarding it as an opaque string directly to `cargo`, after appending
`near-sdk/__abi-embed` if necessary.
@dj8yfo dj8yfo changed the title git: resolve conflicts with main git(source-scan): resolve conflicts with main May 10, 2024
@dj8yfo dj8yfo marked this pull request as ready for review May 10, 2024 17:52
@frol frol merged commit 55d9a4f into near:source-scan-integration May 13, 2024
14 checks passed
@dj8yfo dj8yfo deleted the source-scan-mergemain2 branch May 13, 2024 13:37
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.

None yet

3 participants