-
Notifications
You must be signed in to change notification settings - Fork 261
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
feat(Optimize Go imports): run goimports on Go target code #4777
Changes from 14 commits
9ad39a8
c8b7166
2b03658
2ed2b92
79b2a41
2c31098
375b49b
977f05b
9821ca0
418ca76
2f07ff4
5308135
1a7edcf
4561a2e
397910f
8ec957f
cf2bb36
5df8644
c2ade99
8092f3c
5cd7107
5782838
9d24383
fa31f66
1e4b095
9b86632
1935f0b
899cb5d
55eb801
2b5aafa
36af5f7
bac9d4e
0ba2131
15050d8
e19d9ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,9 +128,9 @@ public virtual void OnPreCompile(ErrorReporter reporter, ReadOnlyCollection<stri | |
} | ||
|
||
/// <summary> | ||
/// Perform any required cleanups after generating code with <c>Compile</c> and <c>EmitCallToMain</c>. | ||
/// Perform any required processing after generating code with <c>Compile</c> and <c>EmitCallToMain</c>. | ||
/// </summary> | ||
public virtual void OnPostCompile() { } | ||
public abstract bool OnPostCompile(string dafnyProgramName, string targetFilename, TextWriter outputWriter); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it makes more sense to keep this as an empty virtual method, so implementing classes don't have to do anything if they don't need this hook. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I needed a return type to convey if the method Yup, I prototyped with a file first and hence the name. Fixed. |
||
|
||
/// <summary> | ||
/// Remove previously generated source files. This is only applicable to compilers that put sources in a separate | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,47 +4,47 @@ | |
package _System | ||
|
||
import ( | ||
_dafny "dafny" | ||
os "os" | ||
_dafny "dafny" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I take it these changes are because No issues with that and in fact that's kind of a nice side-effect of this change! |
||
os "os" | ||
) | ||
|
||
var _ _dafny.Dummy__ | ||
var _ = os.Args | ||
|
||
type Dummy__ struct{} | ||
|
||
|
||
// Definition of class Nat | ||
type Nat struct { | ||
} | ||
|
||
func New_Nat_() *Nat { | ||
_this := Nat{} | ||
_this := Nat{} | ||
|
||
return &_this | ||
return &_this | ||
} | ||
|
||
type CompanionStruct_Nat_ struct { | ||
} | ||
var Companion_Nat_ = CompanionStruct_Nat_ { | ||
} | ||
|
||
var Companion_Nat_ = CompanionStruct_Nat_{} | ||
|
||
func (*Nat) String() string { | ||
return "_System.Nat" | ||
return "_System.Nat" | ||
} | ||
|
||
// End of class Nat | ||
|
||
func Type_Nat_() _dafny.TypeDescriptor { | ||
return type_Nat_{} | ||
return type_Nat_{} | ||
} | ||
|
||
type type_Nat_ struct { | ||
} | ||
|
||
func (_this type_Nat_) Default() interface{} { | ||
return _dafny.Zero | ||
return _dafny.Zero | ||
} | ||
|
||
func (_this type_Nat_) String() string { | ||
return "_System.Nat" | ||
return "_System.Nat" | ||
} | ||
|
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.
Just FYI, we aren't currently ever populating
matrix.target-language-version
, because running the entire suite twice for the sake of a small percentage of tests wasn't frugal. See #1983 for more background, especially my latest comment on how I think we should solve this problem.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 might be the reason the CI is still failing for you in fact.
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.
That's why I wasn't seeing the Go 1.20 execution, I thought it was skipped due to Go 1.11 failures! I have removed the check for
newest
and Go 1.20. Added Go 1.15 (min Go version supported by Aws Sdk) as the version to test against instead of older 1.11.