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

READY : (willbe): Add "publish_diff" command and related functions #1230

Merged
merged 6 commits into from
Mar 21, 2024

Conversation

Barsik-sus
Copy link
Contributor

No description provided.

Created a new function called "publish_diff" in publish_diff.rs, registered it as a new command in mod.rs, and added related functions in package.rs. This "publish_diff" feature compares local and published versions of a specific package.
@Barsik-sus Barsik-sus force-pushed the willbe_publish_diff branch from 59530f5 to 2edeb1f Compare March 21, 2024 14:16
The publish_diff function in publish_diff.rs module has been updated to enhance the package publication capability. The underlying crate comparison logic in package.rs module has also been optimized for better performance. Now, instead of listing the differences byte by byte, files are being compared which makes the DiffReport response more readable and concise.
In the entity package, a sort function has been incorporated into the for loop to sort the diffs. This sort function is sorted by key, assisted by a match pattern which covers all types of diffs including Modified, Same, Rem, and Add.
The commit adds the capturing of the stderr output from a process in the process tools module. It includes error handling for cases when the output contains invalid UTF-8. If such an error is encountered, the function will now return an error report.
@Barsik-sus Barsik-sus changed the title NOT READY: (willbe): Add "publish_diff" command and related functions READY: (willbe): Add "publish_diff" command and related functions Mar 21, 2024
@Wandalen Wandalen changed the title READY: (willbe): Add "publish_diff" command and related functions NOT READY : (willbe): Add "publish_diff" command and related functions Mar 21, 2024
mod private
{
use std::path::PathBuf;
use crate::*;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!


use wca::Args;
use wtools::error::Result;
use crate::_path::AbsolutePath;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!

use std::path::PathBuf;
use crate::*;

use { wtools };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!

@@ -34,6 +34,18 @@ pub( crate ) mod private
.routine( command::publish )
.end()

// qqq : for Barsik : provide hints
.command( "publish.diff" )
.hint( "---" )
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

The commit introduces a new functionality to compare local and remote package versions and generate a detailed report of changes. The comparison looks at each file, stating whether it's been added, removed, or modified. Now, users can see how their local package version is different from the remote one. Command line hints were updated to guide users through this feature.
@Barsik-sus Barsik-sus changed the title NOT READY : (willbe): Add "publish_diff" command and related functions READY : (willbe): Add "publish_diff" command and related functions Mar 21, 2024
@Wandalen Wandalen merged commit 635f8fd into Wandalen:alpha Mar 21, 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.

2 participants