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

technically improvements part 1 #61

Merged
merged 27 commits into from
Feb 10, 2024
Merged

technically improvements part 1 #61

merged 27 commits into from
Feb 10, 2024

Conversation

XSven
Copy link
Contributor

@XSven XSven commented Dec 6, 2023

This pull request contains some of the technical improvements that were already communicated to Olaf Alders. Some points I want to highlight:

  1. Stringify File::pushd objects before passing to them to run() method in t/cli/indexer.t. This is the only test script that was changed!
  2. Strange union type constraint (CodeRef | Str) of author attribute belonging to OrePAN2::Injector class.
  3. The authoring tool of this project is minil. I have removed META.json from git because minil dist creates this automatically.
  4. Use Moo and Type::Tiny consistently. Class::Accessor::Lite isn't use anymore.

@oalders
Copy link
Collaborator

oalders commented Dec 16, 2023

Thanks for this! I'm a bit tied up with the Perl Advent Calendar right now, but this is close to the top of my TODO list.

Copy link
Collaborator

@oalders oalders left a comment

Choose a reason for hiding this comment

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

Looks great! Just had a few comments. I apologize for the delay. December was so busy.

lib/OrePAN2/Index.pm Show resolved Hide resolved
lib/OrePAN2/Index.pm Outdated Show resolved Hide resolved
lib/OrePAN2/Indexer.pm Outdated Show resolved Hide resolved
lib/OrePAN2/Injector.pm Outdated Show resolved Hide resolved
sub new {
my $class = shift;
my %args = @_ == 1 ? %{ $_[0] } : @_;
use namespace::clean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason not to use namespace::autoclean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No not really. I am using namespace::clean because the Moo documentation provides examples how to work with it and scrubbing is restricted to anything imported before its use.

lib/OrePAN2/Repository.pm Show resolved Hide resolved
@oalders
Copy link
Collaborator

oalders commented Jan 10, 2024

I'm going to close and re-open this to kick off CI.

@oalders oalders closed this Jan 10, 2024
@oalders oalders reopened this Jan 10, 2024
@oalders
Copy link
Collaborator

oalders commented Jan 10, 2024

I think it would be best to rebase to pull in some CI changes and a small typo fix that created a merge conflict.

XSven and others added 7 commits January 20, 2024 17:38
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [perl-actions/install-with-cpm](https://github.com/perl-actions/install-with-cpm) from 1.3 to 1.7.
- [Release notes](https://github.com/perl-actions/install-with-cpm/releases)
- [Commits](perl-actions/install-with-cpm@v1.3...v1.7)

---
updated-dependencies:
- dependency-name: perl-actions/install-with-cpm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@XSven XSven requested a review from oalders January 20, 2024 16:57
@XSven
Copy link
Contributor Author

XSven commented Jan 20, 2024

I have done the rebase but I haven's switched from namespace::clean to namespace::autoclean yet. Furthermore I don't understand the conflict that refers to lib/OrePAN2/Repository/Cache.pm. My intention is to work with the data() getter method.

@XSven
Copy link
Contributor Author

XSven commented Feb 8, 2024

Any idea how and when we can continue to complete this pull-request is very much appreciated.

@oalders
Copy link
Collaborator

oalders commented Feb 9, 2024

The merge conflict looks to be:

<<<<<<< master
        or Carp::croak("Cannot calcurate MD5 for '$filename'");
    $self->data->{$stuff} = +{
=======
        or Carp::croak("Cannot calculate MD5 for '$filename'");
    $self->{data}->{$stuff} = +{
>>>>>>> master

I think in the context of this PR, we'd want the first one, which is using the data accessor, rather than the hash key directly.

@XSven
Copy link
Contributor Author

XSven commented Feb 10, 2024

Yes I agree, but I am not able to resolve the conflict because I do not have sufficient access permissions.

@oalders
Copy link
Collaborator

oalders commented Feb 10, 2024

Thanks, @XSven. I'm sorry it took this long to get it merged.

@oalders oalders merged commit 955763b into tokuhirom:master Feb 10, 2024
29 checks passed
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