Merge #480
480: build: fix wrong repo urls, clippies r=koivunej a=koivunej I had forgotten some old urls there which are sure to cause build failures, as seen in the #479. Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
This commit is contained in:
commit
a78a6237db
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -146,6 +146,11 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
echo "::set-output name=ver::$(npm -v)"
|
||||
|
||||
- name: "Conformance tests: setup nodejs 14"
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
- name: "Conformance tests: cache"
|
||||
id: conformance-cache
|
||||
if: matrix.platform.cross == false
|
||||
|
22
conformance/package-lock.json
generated
22
conformance/package-lock.json
generated
@ -11773,8 +11773,8 @@
|
||||
}
|
||||
},
|
||||
"ipfsd-ctl": {
|
||||
"version": "github:ipfs-rust/js-ipfsd-ctl#9459479e28b541d9ed53d1d22c0274dfd8615cb5",
|
||||
"from": "github:ipfs-rust/js-ipfsd-ctl#add_rust_ipfs_http",
|
||||
"version": "github:rs-ipfs/js-ipfsd-ctl#9459479e28b541d9ed53d1d22c0274dfd8615cb5",
|
||||
"from": "github:rs-ipfs/js-ipfsd-ctl#add_rust_ipfs_http",
|
||||
"requires": {
|
||||
"@hapi/boom": "^8.0.1",
|
||||
"@hapi/hapi": "^18.3.2",
|
||||
@ -11792,11 +11792,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"fs-extra": {
|
||||
@ -20114,8 +20114,8 @@
|
||||
}
|
||||
},
|
||||
"rust-ipfs-dep": {
|
||||
"version": "github:ipfs-rust/npm-rust-ipfs-dep#a228daef872f4e5d0f7abf9e286f4a13a860293c",
|
||||
"from": "github:ipfs-rust/npm-rust-ipfs-dep#master",
|
||||
"version": "github:rs-ipfs/npm-rust-ipfs-dep#a228daef872f4e5d0f7abf9e286f4a13a860293c",
|
||||
"from": "github:rs-ipfs/npm-rust-ipfs-dep#master",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"go-platform": "^1.0.0",
|
||||
@ -22251,9 +22251,9 @@
|
||||
}
|
||||
},
|
||||
"unzip-stream": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/unzip-stream/-/unzip-stream-0.3.0.tgz",
|
||||
"integrity": "sha512-NG1h/MdGIX3HzyqMjyj1laBCmlPYhcO4xEy7gEqqzGiSLw7XqDQCnY4nYSn5XSaH8mQ6TFkaujrO8d/PIZN85A==",
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/unzip-stream/-/unzip-stream-0.3.1.tgz",
|
||||
"integrity": "sha512-RzaGXLNt+CW+T41h1zl6pGz3EaeVhYlK+rdAap+7DxW5kqsqePO8kRtWPaCiVqdhZc86EctSPVYNix30YOMzmw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"binary": "^0.3.0",
|
||||
|
@ -11,13 +11,13 @@
|
||||
"dependencies": {
|
||||
"aegir": "^21.3.0",
|
||||
"interface-ipfs-core": "0.139.0",
|
||||
"ipfsd-ctl": "github:ipfs-rust/js-ipfsd-ctl#add_rust_ipfs_http",
|
||||
"ipfsd-ctl": "github:rs-ipfs/js-ipfsd-ctl#add_rust_ipfs_http",
|
||||
"mocha": "^7.1.0",
|
||||
"ipfs-http-client": "46.0.0",
|
||||
"why-is-node-running": "2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rust-ipfs-dep": "github:ipfs-rust/npm-rust-ipfs-dep#master",
|
||||
"rust-ipfs-dep": "github:rs-ipfs/npm-rust-ipfs-dep#master",
|
||||
"ipfs": "0.49.0"
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ struct ResponsesMember {
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct FindPeerQuery {
|
||||
arg: StringSerialized<PeerId>,
|
||||
// FIXME: doesn't seem to be used at the moment
|
||||
#[allow(unused)] // TODO: client sends
|
||||
verbose: Option<bool>,
|
||||
timeout: Option<StringSerialized<humantime::Duration>>,
|
||||
}
|
||||
@ -78,6 +78,7 @@ pub fn find_peer<T: IpfsTypes>(
|
||||
pub struct FindProvidersQuery {
|
||||
arg: StringSerialized<Cid>,
|
||||
// FIXME: in go-ipfs this returns a lot of logs
|
||||
#[allow(unused)]
|
||||
verbose: Option<bool>,
|
||||
#[serde(rename = "num-providers")]
|
||||
num_providers: Option<usize>,
|
||||
@ -132,6 +133,7 @@ pub fn find_providers<T: IpfsTypes>(
|
||||
pub struct ProvideQuery {
|
||||
arg: StringSerialized<Cid>,
|
||||
// FIXME: in go-ipfs this returns a lot of logs
|
||||
#[allow(unused)]
|
||||
verbose: Option<bool>,
|
||||
timeout: Option<StringSerialized<humantime::Duration>>,
|
||||
}
|
||||
@ -174,6 +176,7 @@ pub fn provide<T: IpfsTypes>(
|
||||
pub struct GetClosestPeersQuery {
|
||||
arg: StringSerialized<PeerId>,
|
||||
// FIXME: in go-ipfs this returns a lot of logs
|
||||
#[allow(unused)]
|
||||
verbose: Option<bool>,
|
||||
timeout: Option<StringSerialized<humantime::Duration>>,
|
||||
}
|
||||
|
@ -64,7 +64,9 @@ async fn identity_query<T: IpfsTypes>(
|
||||
pub struct Query {
|
||||
// the peer id to query
|
||||
arg: Option<String>,
|
||||
// this does not seem to be reacted to by go-ipfs
|
||||
// FIXME: this does not seem to be reacted to by go-ipfs (need to recheck with more recent
|
||||
// version, remove if no longer interesting)
|
||||
#[allow(unused)]
|
||||
format: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,12 @@ use warp::{query, Filter, Rejection, Reply};
|
||||
pub struct ResolveQuery {
|
||||
// the name to resolve
|
||||
arg: StringSerialized<IpfsPath>,
|
||||
// FIXME: unsupported
|
||||
#[allow(unused)]
|
||||
#[serde(rename = "dht-record-count")]
|
||||
dht_record_count: Option<usize>,
|
||||
// FIXME: unsupported
|
||||
#[allow(unused)]
|
||||
#[serde(rename = "dht-timeout")]
|
||||
dht_timeout: Option<String>,
|
||||
}
|
||||
|
@ -26,9 +26,11 @@ struct ListRequest {
|
||||
arg: Vec<Cid>,
|
||||
filter: PinFilter,
|
||||
// FIXME: not sure if this is used
|
||||
#[allow(unused)]
|
||||
quiet: bool,
|
||||
// FIXME copypaste
|
||||
// FIXME: only the stream=true is supported
|
||||
stream: bool,
|
||||
#[allow(unused)] // sent by client
|
||||
timeout: Option<humantime::Duration>,
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ mod add;
|
||||
pub struct AddArgs {
|
||||
// unknown meaning; ignoring it doesn't fail any tests
|
||||
#[serde(default, rename = "stream-channels")]
|
||||
#[allow(unused)] // sent by client
|
||||
stream_channels: bool,
|
||||
// progress reports totaling to the input file size
|
||||
#[serde(default)]
|
||||
|
@ -127,6 +127,7 @@ pub fn addrs<T: IpfsTypes>(
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[allow(unused)] // for query sent by conformance tests
|
||||
struct AddrsLocalQuery {
|
||||
id: Option<bool>,
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
/// string. Defined in https://docs-beta.ipfs.io/reference/http/api/#api-v0-version. Included here
|
||||
/// mostly as experimentation on how to do query parameters.
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[allow(unused)] // allowed that to define the version of the query the client sends in conformance tests
|
||||
pub struct Query {
|
||||
number: Option<bool>,
|
||||
commit: Option<bool>,
|
||||
|
@ -51,7 +51,7 @@ where
|
||||
Ipld::String(string) => ser.serialize_str(string),
|
||||
Ipld::Bytes(bytes) => ser.serialize_bytes(bytes),
|
||||
Ipld::List(list) => {
|
||||
let wrapped = list.iter().map(|ipld| Wrapper(ipld));
|
||||
let wrapped = list.iter().map(Wrapper);
|
||||
ser.collect_seq(wrapped)
|
||||
}
|
||||
Ipld::Map(map) => {
|
||||
|
@ -33,7 +33,7 @@ pub async fn resolve(domain: &str) -> Result<IpfsPath, Error> {
|
||||
// previous implementation searched $domain and _dnslink.$domain concurrently. not sure did
|
||||
// `domain` assume fqdn names or not, but local suffices were not being searched on windows at
|
||||
// least. they are probably waste of time most of the time.
|
||||
for domain in searched.into_iter() {
|
||||
for domain in searched {
|
||||
let res = match resolver.txt_lookup(&*domain).await {
|
||||
Ok(res) => res,
|
||||
Err(e) => {
|
||||
@ -55,7 +55,7 @@ pub async fn resolve(domain: &str) -> Result<IpfsPath, Error> {
|
||||
.map(|suffix| {
|
||||
std::str::from_utf8(suffix)
|
||||
.map_err(Error::from)
|
||||
.and_then(|s| IpfsPath::from_str(s))
|
||||
.and_then(IpfsPath::from_str)
|
||||
});
|
||||
|
||||
if let Some(Ok(x)) = paths.next() {
|
||||
|
@ -10,12 +10,14 @@ mod dnslink;
|
||||
/// IPNS facade around [`Ipns`].
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Ipns<Types: RepoTypes> {
|
||||
ipfs: Ipfs<Types>,
|
||||
// FIXME(unused): scaffolding while ipns functionality as a whole suggests we should have dht
|
||||
// queries etc. here (currently unimplemented).
|
||||
_ipfs: Ipfs<Types>,
|
||||
}
|
||||
|
||||
impl<Types: RepoTypes> Ipns<Types> {
|
||||
pub fn new(ipfs: Ipfs<Types>) -> Self {
|
||||
Ipns { ipfs }
|
||||
pub fn new(_ipfs: Ipfs<Types>) -> Self {
|
||||
Ipns { _ipfs }
|
||||
}
|
||||
|
||||
/// Resolves a ipns path to an ipld path.
|
||||
|
@ -6,7 +6,7 @@ use crate::error::Error;
|
||||
use async_trait::async_trait;
|
||||
use std::fs::File;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::{atomic::AtomicU64, Arc};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::Semaphore;
|
||||
|
||||
use super::{BlockRm, BlockRmError, Column, DataStore, Lock, LockError, RepoCid};
|
||||
@ -41,9 +41,6 @@ pub struct FsDataStore {
|
||||
/// collection implementation, it might be needed to hold this permit for the duration of
|
||||
/// garbage collection, or something similar.
|
||||
lock: Arc<Semaphore>,
|
||||
|
||||
/// Not really needed
|
||||
written_bytes: AtomicU64,
|
||||
}
|
||||
|
||||
/// The column operations are all unimplemented pending at least downscoping of the
|
||||
@ -55,7 +52,6 @@ impl DataStore for FsDataStore {
|
||||
FsDataStore {
|
||||
path: root,
|
||||
lock: Arc::new(Semaphore::new(1)),
|
||||
written_bytes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
# Next
|
||||
|
||||
* Document panic introduced in walker ergonomics [#435]
|
||||
* `#[non_exhaustive]` on `unixfs::InvalidCidInLink` error [#480]
|
||||
|
||||
[#435]: https://github.com/rs-ipfs/rust-ipfs/pull/435
|
||||
[#480]: https://github.com/rs-ipfs/rust-ipfs/pull/480
|
||||
|
||||
# 0.2.0
|
||||
|
||||
|
@ -15,7 +15,10 @@ impl<'a> CustomFlatUnixFs<'a> {
|
||||
fn mapped(&self) -> impl Iterator<Item = NamedLeafAsPBLink<'_>> + '_ {
|
||||
self.links
|
||||
.iter()
|
||||
.map(|triple| triple.as_ref().map(|l| NamedLeafAsPBLink(l)).unwrap())
|
||||
// FIXME: this unwrap here seems dangerious; it seems to follow from
|
||||
// `crate::dir::builder::iter::Leaves` assumption that all of these options have
|
||||
// already been filled at the previous stages of post-order visit
|
||||
.map(|triple| triple.as_ref().map(NamedLeafAsPBLink).unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ pub(crate) mod test_support;
|
||||
|
||||
/// A link could not be transformed into a Cid.
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
pub struct InvalidCidInLink {
|
||||
/// The index of this link, from zero
|
||||
pub nth: usize,
|
||||
@ -47,8 +48,6 @@ pub struct InvalidCidInLink {
|
||||
pub name: Cow<'static, str>,
|
||||
/// Error from the attempted conversion
|
||||
pub source: cid::Error,
|
||||
/// This is to deny creating these outside of the crate
|
||||
hidden: (),
|
||||
}
|
||||
|
||||
impl<'a> From<(usize, pb::PBLink<'a>, cid::Error)> for InvalidCidInLink {
|
||||
@ -70,7 +69,6 @@ impl<'a> From<(usize, pb::PBLink<'a>, cid::Error)> for InvalidCidInLink {
|
||||
hash,
|
||||
name,
|
||||
source,
|
||||
hidden: (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user