40 Commits

Author SHA1 Message Date
Michael Vines
7f2977a3b0 Bump version to 1.5.20 2021-04-20 17:04:26 +00:00
Trent Nelson
c32bd40aa4 Bump version to v1.5.19 2021-04-01 20:23:50 +00:00
Tyera Eulberg
ac4722afd7 Bump version to 1.5.18 2021-03-29 23:00:20 -07:00
Tyera Eulberg
f356a05e96 Bump version to 1.5.17 (#16043) 2021-03-19 18:56:05 -06:00
Michael Vines
be05c8b121 Bump version to 1.5.16 2021-03-16 13:29:52 -07:00
mergify[bot]
6e214bbc04 Docs fixups (bp #15801) (#15802)
* docs: add docs links for crates published to crates.io

(cherry picked from commit 24d18b3cf2)

# Conflicts:
#	core/Cargo.toml
#	measure/Cargo.toml
#	programs/bpf/rust/finalize/Cargo.toml

* docs: add rust client api entry

(cherry picked from commit 3e6c7c4a3e)

* docs: rename 'deployed programs' section to 'on-chain programs'

(cherry picked from commit 0e452c8d91)

* docs: 'builtins' -> 'runtime facilities'

(cherry picked from commit 9c8be34906)

* docs: stabilize spl token jsonrpc methods

(cherry picked from commit 45190f6281)

* docs: deprecate lastvalidslot field of jsonrpc getfees

(cherry picked from commit c4ee1ab710)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-03-11 21:49:14 +00:00
Tyera Eulberg
9fbc03d517 Bump version to 1.5.15 (#15768) 2021-03-09 01:48:54 +00:00
Michael Vines
d3672ca23b Bump version to 1.5.14 2021-03-03 19:01:25 -08:00
Michael Vines
6242809a07 Bump version to 1.5.13 2021-03-03 21:51:34 +00:00
sakridge
fa7067950a Update version to v1.5.11 (#15574) 2021-02-27 04:27:54 +00:00
Michael Vines
a80ac11b68 Bump version to v1.5.11 2021-02-25 09:12:39 -08:00
Ryo Onodera
a52a22f558 Bump version to 1.5.10 (#15533) 2021-02-25 21:00:17 +09:00
Michael Vines
8820933287 Bump version to 1.5.9 2021-02-16 22:17:10 -08:00
Trent Nelson
20afb912cd Bump version to 1.5.8 2021-02-13 04:34:36 +00:00
Michael Vines
cd994f0162 Bump version to 1.5.7 2021-02-10 05:18:39 +00:00
Michael Vines
4378634970 Bump version to 1.5.6 2021-01-27 10:50:56 -08:00
Jack May
d72c90e475 Bump version to v1.5.5 (#14700) 2021-01-20 20:26:16 +00:00
Trent Nelson
1b02ec4f6e Bump version to v1.5.4 2021-01-14 04:40:25 +00:00
Michael Vines
ec15ea079f Bump version to 1.5.3 2021-01-08 16:19:27 -08:00
Michael Vines
97665b977e Bump version to v1.5.2 2021-01-04 06:44:52 +00:00
Michael Vines
02da7dfedf Bump version to v1.5.1 2020-12-27 21:57:43 -08:00
Michael Vines
dd711ab5fb Rename solana-program-sdk to solana-program 2020-10-24 08:37:55 -07:00
Michael Vines
63db324204 Initial population of solana-program-sdk 2020-10-24 08:37:55 -07:00
Michael Vines
11df2e2236 Bump version to v1.5.0 2020-10-08 04:51:36 +00:00
Trent Nelson
e12ab9d0dd Bump version to 1.4.0 2020-08-05 12:04:15 -06:00
Aaron Hill
8bcc8edf47 Remove calls to unwrap() in respan! macro
Previously, `proc_macro2::Span::resolved_at` was gated behind
cfg(procmacro2_semver_exempt). This gate has been removed in the latest
version of proc-macro2, allowing us to avoid using `unwrap()` to use the
underling method on `proc_macro::Span`
2020-08-02 19:15:06 -07:00
Aaron Hill
e7387f60a7 Fix clippy lints 2020-07-14 14:40:02 -07:00
Aaron Hill
05445c718e Fix hygiene issues in declare_program! and declare_loader!
The `declare_program!` and `declare_loader!` macros both expand to
new macro definitions (based on the `$name` argument). These 'inner'
macros make use of the special `$crate` metavariable to access items in
the crate where the 'inner' macros is defined.

However, this only works due to a bug in rustc. When a macro is
expanded, all `$crate` tokens in its output are 'marked' as being
resolved in the defining crate of that macro. An inner macro (including
the body of its arms) is 'just' another set of tokens that appears in
the body of the outer macro, so any `$crate` identifiers used there are
resolved relative to the 'outer' macro.

For example, consider the following code:

```rust
macro_rules! outer {
    () => {
        macro_rules! inner {
            () => {
                $crate::Foo
            }
        }
    }
}
```

The path `$crate::Foo` will be resolved relative to the crate that defines `outer`,
**not** the crate which defines `inner`.

However, rustc currently loses this extra resolution information
(referred to as 'hygiene' information) when a crate is serialized.
In the above example, this means that the macro `inner` (which gets
defined in whatever crate invokes `outer!`) will behave differently
depending on which crate it is invoked from:

When `inner` is invoked from the same crate in which it is defined,
the hygiene information will still be available,
which will cause `$crate::Foo` to be resolved in the crate which defines 'outer'.

When `inner` is invoked from a different crate, it will be loaded from
the metadata of the crate which defines 'inner'. Since the hygiene
information is currently lost, rust will 'forget' that `$crate::Foo` is
supposed to be resolved in the context of 'outer'. Instead, it will be
resolved relative to the crate which defines 'inner', which can cause
incorrect code to compile.

This bug will soon be fixed in rust (see https://github.com/rust-lang/rust/pull/72121),
which will break `declare_program!` and `declare_loader!`. Fortunately,
it's possible to obtain the desired behavior (`$crate` resolving in the
context of the 'inner' macro) by use of a procedural macro.

This commit adds a `respan!` proc-macro to the `sdk/macro` crate.
Using the newly-stabilized (on Nightly) `Span::resolved_at` method,
the `$crate` identifier can be made to be resolved in the context of the
proper crate.

Since `Span::resolved_at` is only stable on the latest nightly,
referencing it on an earlier version of Rust will cause a compilation error.
This requires the `rustversion` crate to be used, which allows conditionally
compiling code epending on the Rust compiler version in use. Since this method is already
stabilized in the latest nightly, there will never be a situation where
the hygiene bug is fixed (e.g. https://github.com/rust-lang/rust/pull/72121)
is merged but we are unable to call `Span::resolved_at`.
2020-07-14 14:40:02 -07:00
Tyera Eulberg
f37d2d5a58 Add docs to declare_id macro (#10671) 2020-06-17 19:57:23 -06:00
R. M. Shea
48febf153b Change documentation introduction to indicate Foundation IP transfer (#10440) 2020-06-13 14:41:05 -07:00
Michael Vines
9eefb2c929 Bump version to 1.3.0 2020-05-28 15:01:13 -07:00
Tyera Eulberg
3ee702a922 Rpc: Add getCirculatingSupply endpoint, redux (#9953)
* Add Bank.clock() helper

* Add non-circulating calculations

* Plumb getSupply rpc endpoint

* Add docs for getSupply, and remove getTotalSupply from docs

* Add pubkeys! procedural macro

* Use procedural macro in non_circulating_supply
2020-05-09 12:05:29 -06:00
Michael Vines
8dfe0affd4 Add incinerator sysvar (#9815) 2020-04-30 22:04:08 -07:00
Michael Vines
47ae57610a Only build x86_64-unknown-linux-gnu on docs.rs 2020-04-16 19:06:17 -07:00
Michael Vines
d7fa40087c Bump version to 1.2.0 2020-03-28 09:44:13 -07:00
Dan Albert
2d9d2f1e99 Update cargo versions from 1.0 to 1.1 (#8397) 2020-02-21 23:09:45 -08:00
Michael Vines
48f58a88bc Bump version to 1.0.0 2020-02-20 23:52:19 -07:00
Dan Albert
c324e71768 Bump cargo toml versions to 0.24.0 (#7976) 2020-01-25 11:04:27 -06:00
Dan Albert
ca10cf081f Update cargo.toml files from 0.22.0 to 0.23.0 (#7596) 2019-12-20 21:45:42 -05:00
Justin Starry
7cfff75c3e Use procedural macro to generate static public keys (#7219)
automerge
2019-12-03 17:55:18 -08:00