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

optimize detect import blocks #120

Merged
merged 1 commit into from Nov 7, 2022
Merged

optimize detect import blocks #120

merged 1 commit into from Nov 7, 2022

Conversation

daixiang0
Copy link
Owner

@daixiang0 daixiang0 commented Nov 7, 2022

  • optimize import blocks detection logic
  • introduce breaking change: remove isolated comments

Signed-off-by: Loong loong.dai@intel.com

@daixiang0 daixiang0 merged commit 85f4d54 into master Nov 7, 2022
@daixiang0
Copy link
Owner Author

Fix #119

@daixiang0 daixiang0 deleted the imports branch November 7, 2022 08:06
Signed-off-by: Loong <loong.dai@intel.com>
@avorima
Copy link
Contributor

avorima commented Feb 2, 2023

When I run this PR on the example repo of #119 (https://gitlab.com/cznic/sortutil.git) I get the following diff:

iff --git a/sortutil.go b/sortutil.go
index 28ed235..210ba49 100644
--- a/sortutil.go
+++ b/sortutil.go
@@ -4,7 +4,7 @@

 // Package sortutil provides utilities supplementing the standard 'sort' package.
 //
-// Changelog
+// # Changelog
 //
 // 2019-10-24: v1.1.0: Added topological sort.
 //
@@ -13,11 +13,9 @@ package sortutil // import "modernc.org/sortutil"

 import (
        "math/big"
+       "sort"
 )

-import "sort"
-
-// BigIntSlice attaches the methods of sort.Interface to []*big.Int, sorting in increasing order.
 type BigIntSlice []*big.Int

 func (s BigIntSlice) Len() int           { return len(s) }

I don't think the comment of BigIntSlice should be removed and that # also looks suspicious.

@daixiang0
Copy link
Owner Author

@avorima which version do you use?

@avorima
Copy link
Contributor

avorima commented Feb 6, 2023

I tested with version 0.8.3, but it looks like the latest version 0.9.0 no longer has any issues with the example

@daixiang0
Copy link
Owner Author

Thanks, let's use the latest version.

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.

None yet

2 participants