feat: [#471] The methods of path should return absolute path#948
Merged
krishankumar01 merged 2 commits intomasterfrom Mar 9, 2025
Merged
feat: [#471] The methods of path should return absolute path#948krishankumar01 merged 2 commits intomasterfrom
krishankumar01 merged 2 commits intomasterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #948 +/- ##
==========================================
- Coverage 69.16% 69.15% -0.01%
==========================================
Files 157 157
Lines 10519 10526 +7
==========================================
+ Hits 7275 7279 +4
- Misses 2911 2913 +2
- Partials 333 334 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
PR Overview
This PR updates the various application path methods so that they now return absolute paths instead of relative paths. Key changes include:
- Replacing filepath.Join calls with a common absPath function to ensure absolute paths.
- Prepending a new constant (support.RelativePath) to the path segments.
- Updating test cases to assert that absolute paths based on support.RootPath are returned.
Reviewed Changes
| File | Description |
|---|---|
| foundation/application.go | Updated path helper methods to use absPath and support constants |
| foundation/application_test.go | Modified expectations in tests to account for absolute paths |
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
foundation/application_test.go:65
- The test expects the Path method to return a path prefixed with support.RootPath, but the implementation uses support.RelativePath. Ensure both the implementation and tests align on the correct prefix.
s.Equal(filepath.Join(support.RootPath, "app", "goravel.go"), s.app.Path("goravel.go"))
almas-x
pushed a commit
that referenced
this pull request
Mar 12, 2025
almas-x
pushed a commit
that referenced
this pull request
Mar 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📑 Description
Closes goravel/goravel#471
✅ Checks