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

remove unused imports #1153

Merged
merged 3 commits into from
Oct 22, 2024
Merged

remove unused imports #1153

merged 3 commits into from
Oct 22, 2024

Conversation

Yu-zh
Copy link
Collaborator

@Yu-zh Yu-zh commented Oct 21, 2024

No description provided.

Copy link

peter-jerry-ye-code-review bot commented Oct 21, 2024

Review of git diff Output

1. Unnecessary Module Imports Removed

  • Files: immut/hashset/moon.pkg.json, option/moon.pkg.json, sorted_set/moon.pkg.json, strconv/moon.pkg.json, string/moon.pkg.json
  • Changes: Several unnecessary module imports have been removed. For example, "moonbitlang/core/tuple" was removed from immut/hashset/moon.pkg.json.
  • Suggestion: This is a good practice to reduce unnecessary dependencies and potentially improve build times and reduce complexity. Ensure that the removed imports were indeed unnecessary and did not impact functionality.

2. Temporary Workaround Added

  • File: json/from_json_test.mbt
  • Changes: A temporary function temp() has been added with a FIXME comment indicating it's a workaround for a formatter bug.
  • Suggestion: Temporary workarounds should be addressed promptly. Add a task or issue to the project management tool to remind developers to remove the workaround once the bug is fixed. Additionally, ensure that the workaround does not introduce new bugs or inefficiencies.

3. Code Cleanup

  • File: json/from_json_test.mbt
  • Changes: A blank line and the call to temp() have been added within the test block.
  • Suggestion: Ensure that the blank line and the call to temp() are indeed necessary. If they are part of a broader cleanup or refactoring, make sure they adhere to coding standards and do not obfuscate the test logic.

Summary

The changes primarily focus on removing unnecessary module imports, which is a good practice for maintainability and performance. The addition of a temporary workaround in json/from_json_test.mbt should be tracked and resolved as soon as possible to avoid accumulating technical debt. Regular code reviews and cleanups are crucial to maintaining a healthy codebase.

@coveralls
Copy link
Collaborator

coveralls commented Oct 21, 2024

Pull Request Test Coverage Report for Build 3665

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.744%

Totals Coverage Status
Change from base Build 3652: 0.0%
Covered Lines: 4258
Relevant Lines: 5146

💛 - Coveralls

@@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

typealias TestX = Map[String, Int]
Copy link
Contributor

Choose a reason for hiding this comment

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

@Yoorkin can you check why new line is missed here? note this caused license header check failure

Copy link
Contributor

Choose a reason for hiding this comment

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

I pushed a commit to work around the formatter bug

@bobzhang bobzhang merged commit 13d85b0 into moonbitlang:main Oct 22, 2024
13 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.

3 participants