Skip to content

Improve stacktrace#4

Merged
kfly8 merged 2 commits intomainfrom
stacktrace
Apr 19, 2025
Merged

Improve stacktrace#4
kfly8 merged 2 commits intomainfrom
stacktrace

Conversation

@kfly8
Copy link
Copy Markdown
Owner

@kfly8 kfly8 commented Apr 19, 2025

This pull request refactors the Result::Simple module to improve code readability and maintainability, enhances the pipeline function by assigning a subroutine name for better debugging, and updates the test suite to improve stack trace validation and coverage. Below are the most important changes grouped by theme:

Code Refactoring and Enhancements:

  • Renamed variables in chain and pipeline functions for clarity ($f to $function, @f to @functions) and updated related logic to improve readability. (lib/Result/Simple.pm, lib/Result/Simple.pmL147-R174)
  • Assigned a subroutine name (__PIPELINED_FUNCTION__) to the pipeline function using Sub::Util::set_subname for better debugging and stack trace clarity. (lib/Result/Simple.pm, lib/Result/Simple.pmL179-R194)

Test Suite Improvements:

  • Enhanced stack trace validation in tests by splitting error messages into lines and adding more granular checks for function names and file references. (t/Result-Simple.t, [1] [2] [3]
  • Added note statements in tests to provide additional debugging information about stack trace lines. (t/Result-Simple.t, [1] [2] [3]
  • Updated tests to include dies for exception validation and improved consistency in stack trace checks for cases where CHECK_ENABLED is falsy. (t/check-disabled.t, [1] [2]

Minor Updates:

  • Added note to the Test2::V0 imports in test files to enable additional debugging output. (t/Result-Simple.t, [1]; t/check-disabled.t, [2]

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 19, 2025

Pull Request Test Coverage Report for Build 14546562354

Details

  • 14 of 14 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 14542955396: 0.0%
Covered Lines: 106
Relevant Lines: 106

💛 - Coveralls

@kfly8 kfly8 requested a review from Copilot April 19, 2025 06:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (3)
  • lib/Result/Simple.pm: Language not supported
  • t/Result-Simple.t: Language not supported
  • t/check-disabled.t: Language not supported

@kfly8 kfly8 self-assigned this Apr 19, 2025
@kfly8 kfly8 merged commit 4f1747b into main Apr 19, 2025
14 checks passed
kfly8 added a commit that referenced this pull request Apr 19, 2025
Changelog diff is:

diff --git a/Changes b/Changes
index 72aa9ca..693bf60 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
 Revision history for Perl extension Result-Simple
 
 {{$NEXT}}
+
+0.05 2025-04-19T23:07:50Z
     - Improve stactrace #4
     - [ENHANCEMENTS]
       - Added `combine` and `combine_with_all_errors`` helpers #5
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.

3 participants