Skip to content

Commit

Permalink
Fix dependency error
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiimk committed Jul 31, 2021
1 parent f0c18de commit 27a17aa
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 51 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.48.2] - 2021-07-31
### Fixed
- Dependency error in `remote` commands
- Remove incorrect `.gitignore` file generation

## [0.48.1] - 2021-07-26
### Fixed
- `sql` command failing on OSX
Expand Down
52 changes: 26 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kamu-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kamu-cli"
version = "0.48.1"
version = "0.48.2"
description = "Decentralized data management tool"
authors = ["Sergii Mikhtoniuk <mikhtoniuk@gmail.com>"]
license = "MPL-2.0"
Expand Down
13 changes: 0 additions & 13 deletions kamu-cli/src/commands/init_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use super::{Command, Error};
use kamu::infra::*;

use std::fs;
use std::io::prelude::*;

pub struct InitCommand {
workspace_layout: WorkspaceLayout,
Expand Down Expand Up @@ -31,18 +30,6 @@ impl Command for InitCommand {
fs::create_dir_all(&self.workspace_layout.run_info_dir)?;
fs::create_dir_all(&self.workspace_layout.local_volume_dir)?;

{
let gitignore_path = self.workspace_layout.kamu_root_dir.join(".gitignore");
let mut gitignore = fs::File::create(gitignore_path)?;
writeln!(gitignore, "/config")?;
gitignore.sync_all()?;
}

{
let gitignore_path = self.workspace_layout.local_volume_dir.join(".gitignore");
fs::write(gitignore_path, "*\n".as_bytes())?;
}

eprintln!(
"{}",
console::style("Initialized an empty workspace")
Expand Down
2 changes: 1 addition & 1 deletion kamu-core-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kamu-test"
version = "0.48.1"
version = "0.48.2"
authors = ["Sergii Mikhtoniuk <mikhtoniuk@gmail.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion kamu-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kamu"
version = "0.48.1"
version = "0.48.2"
authors = ["Sergii Mikhtoniuk <mikhtoniuk@gmail.com>"]
edition = "2018"

Expand Down
8 changes: 2 additions & 6 deletions kamu-core/src/infra/sync_service_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::sync::{Arc, Mutex};
pub struct SyncServiceImpl {
workspace_layout: WorkspaceLayout,
metadata_repo: Arc<dyn MetadataRepository>,
remote_factory: Arc<Mutex<RemoteFactory>>,
remote_factory: Arc<RemoteFactory>,
_logger: Logger,
}

Expand All @@ -20,7 +20,7 @@ impl SyncServiceImpl {
pub fn new(
workspace_layout: &WorkspaceLayout,
metadata_repo: Arc<dyn MetadataRepository>,
remote_factory: Arc<Mutex<RemoteFactory>>,
remote_factory: Arc<RemoteFactory>,
logger: Logger,
) -> Self {
Self {
Expand Down Expand Up @@ -53,8 +53,6 @@ impl SyncService for SyncServiceImpl {

let client = self
.remote_factory
.lock()
.unwrap()
.get_remote_client(&remote)
.map_err(|e| SyncError::InternalError(e.into()))?;

Expand Down Expand Up @@ -198,8 +196,6 @@ impl SyncService for SyncServiceImpl {

let client = self
.remote_factory
.lock()
.unwrap()
.get_remote_client(&remote)
.map_err(|e| SyncError::InternalError(e.into()))?;

Expand Down
4 changes: 2 additions & 2 deletions kamu-core/tests/infra/test_sync_service_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use opendatafabric::*;
use assert_matches::assert_matches;
use chrono::prelude::*;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::sync::Arc;
use url::Url;

fn list_files(dir: &Path) -> Vec<PathBuf> {
Expand Down Expand Up @@ -96,7 +96,7 @@ fn do_test_sync(tmp_workspace_dir: &Path, remote_url: Url) {
let volume_layout = VolumeLayout::new(&workspace_layout.local_volume_dir);
let dataset_layout = DatasetLayout::new(&volume_layout, dataset_id);
let metadata_repo = Arc::new(MetadataRepositoryImpl::new(&workspace_layout));
let remote_factory = Arc::new(Mutex::new(RemoteFactory::new(logger.clone())));
let remote_factory = Arc::new(RemoteFactory::new(logger.clone()));

let sync_svc = SyncServiceImpl::new(
&workspace_layout,
Expand Down
2 changes: 1 addition & 1 deletion opendatafabric/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opendatafabric"
version = "0.48.1"
version = "0.48.2"
authors = ["Sergii Mikhtoniuk <mikhtoniuk@gmail.com>"]
edition = "2018"

Expand Down

0 comments on commit 27a17aa

Please sign in to comment.