Skip to content

Conversation

@fredbi
Copy link
Member

@fredbi fredbi commented Mar 18, 2025

This clarifies the dependencies between the various utilities exposed by this package.

Ultimately (not in this PR), we may convert some of the sub-packages into go modules, so as to isolate dependencies and allow users of some of the features not to be polluted by cross-dependencies.

@fredbi fredbi marked this pull request as draft March 18, 2025 19:05
@fredbi fredbi changed the title refact: refactored the package into multiple specialized sub-packages WIP: refact: refactored the package into multiple specialized sub-packages Mar 19, 2025
@fredbi fredbi force-pushed the refact/sub-packages branch from 6cfc090 to e0e634f Compare March 25, 2025 10:33
@fredbi fredbi force-pushed the refact/sub-packages branch from 939a046 to 472ab3c Compare March 26, 2025 17:02
@codecov
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.40%. Comparing base (886f8f1) to head (e361832).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #106      +/-   ##
==========================================
+ Coverage   90.08%   90.40%   +0.32%     
==========================================
  Files          31       36       +5     
  Lines        1826     1835       +9     
==========================================
+ Hits         1645     1659      +14     
+ Misses        146      142       -4     
+ Partials       35       34       -1     
Flag Coverage Δ
oldstable-macos-latest 89.15% <100.00%> (+0.32%) ⬆️
oldstable-ubuntu-latest 89.15% <100.00%> (+0.32%) ⬆️
oldstable-windows-latest 90.08% <100.00%> (+0.32%) ⬆️
stable-macos-latest 89.15% <100.00%> (+0.32%) ⬆️
stable-ubuntu-latest 89.15% <100.00%> (+0.32%) ⬆️
stable-windows-latest 90.08% <100.00%> (+0.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fredbi fredbi force-pushed the refact/sub-packages branch from 472ab3c to 1ebdad1 Compare March 30, 2025 15:23
@fredbi fredbi force-pushed the refact/sub-packages branch from 1ebdad1 to 3488569 Compare March 30, 2025 17:01
@fredbi fredbi changed the title WIP: refact: refactored the package into multiple specialized sub-packages refact: refactored the package into multiple specialized sub-packages Mar 30, 2025
@fredbi fredbi marked this pull request as ready for review March 30, 2025 17:03
This clarifies the dependencies between the various utilities exposed by
this package.

Ultimately (not in this PR), we may convert some of the sub-packages
into go modules, so as to isolate dependencies and allow users of
some of the features not to be polluted by cross-dependencies.

* refactored mangling to remove package state

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi fredbi force-pushed the refact/sub-packages branch from 3488569 to e361832 Compare March 30, 2025 17:05
@fredbi fredbi requested a review from Copilot March 30, 2025 17:06
Copy link
Contributor

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.

Pull Request Overview

This PR refactors the package into multiple specialized sub-packages to clarify dependencies and prepare for eventual modularization using Go modules. The changes involve updating deprecation messages, reorganizing packages (with several files moving from the “swag” package to their respective specialized packages), and updating corresponding documentation.

  • Update deprecation messages in interface files.
  • Split code into specialized sub-packages and adjust package declarations.
  • Revise documentation across multiple packages to reflect the new structure.

Reviewed Changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
jsonutils_iface.go Updated deprecation comment for WriteJSON
jsonutils/doc.go Added documentation for the jsonutils package
jsonname_iface_test.go Updated test for deprecation on NameProvider
jsonname_iface.go Added deprecation aliases for jsonname functions
jsonname/name_provider_test.go Changed package from swag to jsonname for tests
jsonname/name_provider.go Updated package name and documentation comments
jsonname/doc.go Added documentation for the jsonname package
fileutils_iface_test.go Added tests for deprecated fileutils functionality
fileutils_iface.go Added deprecation aliases for fileutils functions
fileutils/path_test.go Changed package from swag to fileutils
fileutils/path.go Changed package from swag to fileutils and minor comment improvement
fileutils/file_test.go Changed package from swag to fileutils
fileutils/file.go Changed package from swag to fileutils
fileutils/doc.go Added documentation for the fileutils package
doc.go Updated package-level documentation to note deprecation of package-level members
conv/doc.go Revised documentation for the conv package with updated formatting
cmdutils_iface_test.go Added tests for the cmdutils interface
cmdutils_iface.go Added deprecation alias for CommandLineOptionsGroup
cmdutils/doc.go Added documentation for the cmdutils package
cmdutils/cmd_utils.go Added new file detailing command line utility structures
Comments suppressed due to low confidence (1)

fileutils/path.go:23

  • Consider capitalizing 'gopath' to 'GOPATH' in the comment for consistency with the constant's value.
// GOPATHKey represents the env key for gopath

@fredbi fredbi merged commit f54a6c0 into go-openapi:master Mar 30, 2025
11 checks passed
@fredbi fredbi deleted the refact/sub-packages branch March 30, 2025 17:11
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