Code Monkey home page Code Monkey logo

gfold's Introduction

gfold's People

Contributors

acksld avatar bors[bot] avatar dylan-dpc avatar jrcichra avatar nickgerace avatar orhun avatar soutrikbandyopadhyay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gfold's Issues

Fix is_unpushed to use correct remote

Describe the issue.

The "origin" resolved during is_unpushed is from the main remote branch, and not the remote of the local branch being tracked. Regardless of the fix, we may need to check if a remote exists for the local branch.

Is this a bug report, feature request, or another type of issue?

bug report

Are you using Windows, macOS, Linux, or another OS?

all supported platforms

Are you using a pre-built binary? If not, how did you obtain gfold?

build from source

Switch to structopt for the CLI library

We are running unversioned clap-rs, grabbing the latest from its main branch. It may be worth considering using structopt until clap-rs v3 releases (even after that too).

Library should not log

The gfold library should not log. The application should, if needed. Since the architecture is mainly a small CLI backed by a library, logging might even be removed entirely.

In addition, the logging from gfold 1.2.1 and before was very opinionated and included text that could become out of date or be incorrect.

Minimize issue filing process

Minimize issue filing process to have as minimal questions as possible.

OS type

Exact version number would no longer be required (such as Windows 10 2004, macOS 11.0, and Ubuntu 20.10

Prebuilt-binary or not

High-level obtainment method required (ex: build from source, crates.io, GitHub release download, etc.)

Type of request

RFE, bug, other.

Panics on Bare Repo

Hey! I came to your tool from ๐Ÿ“ How I Read "The Rust Programming Language".

I noticed that the binary panics on bare repositories.

image

โžœ  tmp RUST_BACKTRACE=full /Users/kyle/.cargo/bin/gfold
thread 'main' panicked at 'failed get statuses: cannot status. This operation is not allowed against bare repositories.; class=Repository (6); code=BareRepo (-8)', src/gfold.rs:71:27
stack backtrace:
   0:        0x1067e61fe - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h13e6f26430148ff2
   1:        0x1068038cc - core::fmt::write::h45a9bd04db15c24f
   2:        0x1067e3629 - std::io::Write::write_fmt::h8ae61696f13218d5
   3:        0x1067e7e75 - std::panicking::default_hook::{{closure}}::hc98fe2390b6284e5
   4:        0x1067e7bb2 - std::panicking::default_hook::h9a63cea866a4c14a
   5:        0x1067e83d5 - std::panicking::rust_panic_with_hook::h4d446ca45c8e1faa
   6:        0x1067e7fa2 - rust_begin_unwind
   7:        0x10680f1db - std::panicking::begin_panic_fmt::h0f7b83f993394bc5
   8:        0x1066fedb0 - gfold::gfold::walk_dir::h7ce7a797048a9dd9
   9:        0x1066fc1b9 - gfold::main::h9a34aaa0573dc180
  10:        0x1066fc4e6 - std::rt::lang_start::{{closure}}::h1185fef6ccb1df63
  11:        0x1067e86a9 - std::rt::lang_start_internal::hecbcda5e1a75a865
  12:        0x1066fc4d9 - main

Steps to reproduce

$ mkdir repos
$ cd repos
$ git clone --bare https://github.com/octocat/Spoon-Knife
$ gfold

Refactor library into driver and util files

Description

Refactor library into driver and util files. This will help organize the gfold API for future refactors and changes.

Environment Details

Please feel free to add any additional details beyond the questions below.

Is this a bug report, feature request, or another type of issue?

Feature request

Are you using Windows, macOS, Linux, or another OS?

Windows, macOS, and Linux on amd64

Are you using a pre-built binary? If not, how did you obtain gfold?

Build from source

Arch Linux (AUR) Packages

Hi,
I came across your project and I liked it. It looks promising for sure. ๐Ÿš€
I'm also a Rust developer and I maintain AUR packages in my spare time. So I created the following packages for the installation of gfold on Arch Linux and other distributions that support installing packages from AUR:

Installation can be made simply by a AUR helper such as yay. (e.g: yay -S gfold)

Feel free to update your documentation regarding to the AUR packages and installation. (I would propose a PR if requested)

Take care,
orhun.

Add `-k` flag to give kubectl-like output

Describe the issue:

Add -k flag to give kubectl-like output. This involves combining all results into one table with headers similar to kubectl.

Is this a bug report, feature request, or another type of issue?

feature request

Are you using Windows, macOS, Linux, or another OS?

all (maintainer)

How did you obtain the application?

all (maintainer)

Paste the output of gfold -V:

% gfold -V
gfold 1.4.0

Recover as many errors as possible

There are many panic scenarios in gfold currently. This issue aims to recover on as many errors as possible, if not all of them.

Ideally, we would like main.rs to make every decision on how to handle the errors, and avoid panics in the library.

Remove gfld and consolidate optimizations into gfold

Summary

gfld was an experiment to try to make a smaller, and faster, alternative to gfold. The results have been that gfold is much faster, despite it's larger size. Thus, the following should happen:

  • Removal of gfld
  • Learned optimizations to be integrated into gfold
  • Return to a single crate repository structure (has the bonus benefit of being easier to maintain)

Details

  • On average, the runtime speed of gfld 1.0.4 is ~105% slower than the runtime speed of gfold 1.0.4
  • The binary size of gfld 1.0.4 is about ~40% smaller than gfold 1.0.4

Estimates

  • gfold can potentially have its binary size reduced to ~60% of the size of gfold 1.0.4
  • gfold runtime speeds will either be the same, better, or more consistent with proposed optimizations

Replace unnecessary panics with returned errors

Describe the issue. Feel free to be descriptive.

Instead of using expect and panic frequently, return the errors instead. It would be preferred to recover on many of these errors rather than simply "returning" them from the calling function, but this is a good first step.

What are you attempting to do, and/or what did you expect? In other words, what is the motivation and context to this issue?

The motivation is to clean up the codebase to return nearly all panic scenarios to main.rs. This is stepping stone towards recovering on more errors.

Is this a bug report, feature request, or another type of issue? If this is a bug report, describe how to reproduce the issue.

Feature enhancement

Are you using a pre-built binary? If not, please specify.

Yes

What OS are you using, and at what version number?

All OSes with corresponding GitHub releases, using the latest major version of each

What CPU architecture are you using? If you do not know, it is most likely amd64 or x86_64.

amd64

Additional information (optional)

None.

Add Cargo.lock to workspace root

Describe the issue.

According to the cargo workspace documentation, all packages should share a common Cargo.lock file which should be present in the workspace root.

All packages share a common Cargo.lock file which resides in the workspace root.

Also AUR packages will become non-reproducible due to this issue since --locked flag causes the build to fail. (because Cargo.lock doesn't exist in the workspace root)

==> Starting build()...
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /build/gfold/src/gfold-1.0.0/gfld/Cargo.toml
workspace: /build/gfold/src/gfold-1.0.0/Cargo.toml
    Updating crates.io index
error: the lock file /build/gfold/src/gfold-1.0.0/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, use the --offline flag.
==> ERROR: A failure occurred in build().

Solution is simply removing Cargo.lock from .gitignore and pushing it.

Is this about gfold, gfld, or both?

Both, about Cargo workspaces.

Is this a bug report, feature request, or another type of issue?

Bug report.

Paste the output of the relevant application(s).

# to reproduce the build error
git clone "https://aur.archlinux.org/gfold-git"
cd gfold-git/
extra-x86_64-build

Add small backtrace to get file and line number

We do not need an extended backtrace. gfold should remain lightweight. Since the codebase is relatively small, the file and line number should be enough to help determine the cause of the error. Custom errors are probably not necessary.

[Feature Request]

  • in the table rows, one could have a clickable repository url
  • and of course a state against the local repo : upgradable (5 commits)

with colors, in term of importance (new version > commits > minor commit > ...)

my 2 cents, I wanted to build the same tool, and I'm surprised how compact the code is, bravo!

Add GitHub releases with binaries

We should add binaries for every tagged release with the minimum being...

  • Linux: linux-gnu-amd64
  • macOS: darwin-amd64
  • Windows 10: windows-amd64

Move from StructOpt to Clap v3 (beta)

Describe the issue:

Since Clap v3 will be the successor to StructOpt and Clap v3 beta releases have been relatively stable, we should move to using Clap v3 (beta).

Is this a bug report, feature request, or another type of issue?

refactor

Are you using Windows, macOS, Linux, or another OS?

n/a

How did you obtain the application?

n/a

Paste the output of gfold -V:

n/a

Release version 1.0.0

Starting this issue just to keep track of release 1.0.0. This version will be considered "stable" for at least one binary, probably macos-amd64.

Add release action

Describe the issue:

Add release action, but don't add hosted binaries yet. Using a package manager is always ideal.

Is this a bug report, feature request, or another type of issue?

feature (meta)

Are you using Windows, macOS, Linux, or another OS?

n/a

How did you obtain the application?

n/a

Paste the output of gfold -V:

n/a

Suspend support for Linux MUSL binaries

Supporting MUSL requires using Docker at the moment. Since there are few users of gfold at the moment, we should suspend usage to minimize bloat in the CI pipeline.

However, if there's user interest, we should consider adding back statically-linked Linux (amd64) binaries to the pipleline.

There are no results to display

Describe the issue.

It's weird, I don't seem to see any results. with strace I see that some git files are read.

~/dev
โฏ gfold
There are no results to display.

gfold 0.8.0

Is this a bug report, feature request, or another type of issue?

bug

Are you using Windows, macOS, Linux, or another OS?

Linux

Are you using a pre-built binary? If not, how did you obtain gfold?

cargo install gfold

Move from library-driven structure to application-driven structure

Describe the issue:

Since gfold's library API is not consumed by any other application, nor is it fully designed to be, we should revert back to an application-driven structure to reduce complexity. This may also enable logging to return in a fully capacity since all code will not be library code. Moreover, this would likely result in the removal of lib.rs.

Is this a bug report, feature request, or another type of issue?

refactor

Are you using Windows, macOS, Linux, or another OS?

n/a

How did you obtain the application?

n/a

Paste the output of gfold -V:

n/a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.