-
Notifications
You must be signed in to change notification settings - Fork 93
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
build: Update for Mac M1 support #980
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #980 +/- ##
========================================
Coverage 60.15% 60.15%
========================================
Files 41 41
Lines 5702 5702
========================================
Hits 3430 3430
Misses 1825 1825
Partials 447 447 Continue to review full report at Codecov.
|
Requires algorand/go-algorand#3920 since we depend on some go-algorand pkgs in indexer as well. |
@@ -22,7 +21,7 @@ func TestPrintableUTF8OrEmpty(t *testing.T) { | |||
}, | |||
{ | |||
"Asset 510285544", | |||
"8J+qmSBNb25leQ==", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this need to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure of the exact root cause, but from what I can tell, that string is 🪙 Money, want
which returns a printable string (failing the test which expects it not to be printable) while the new string 🪙 Money, want\n
includes newline and is not printable (as anticipated) on the newline character.
It looks like the most recent update to the unicode bits in go is golang/go@8ec5a05 which started in 1.16. That could be the root cause if we were expecting the moon symbol to fail since we're on 1.13. But I haven't dug that deep on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also reminded me that I forgot to update golang in this PR. Updating with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#943 also includes changes to this test so it must be failing on golang1.16 as well.
c21522a
to
7aa758a
Compare
It looks like |
@Eric-Warehime I believe go-algorand is using 1.16 specific functionality. We have to disable the 1.14.7 / 1.15.15 tests. |
} | ||
resourcesForAddress[creatable] = normalizeAccountResource(appResource) | ||
default: | ||
err1 = fmt.Errorf("checkModifiedState() unexpected creatable type %v", creatable.Type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tolikzinovyev could you review this section? It seems reasonable, but should we call normalizeAccountResource(ar)
for the AssetCreatable
case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would only suggest to do one of the following:
- Keep
normalizeAccountResource()
unchanged and call it after theswitch
. - Change
normalizeAccountResource()
intonormalizeAppResource()
that would accept and returnledgercore.AppResource
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went with changing normalizeAccountResource
to convertAppResource
which will return an AccountResource
with normalized fields. I think it's more properly named and avoids calling the function when it's not necessary for AssetResource
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tolikzinovyev Let me know if you have any feedback on these changes. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Adds M1 support
Test Plan
Tests run locally on my M1 machine.
Will need to update CI to include M1 arm64 test support.