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
Improve Suggestion: build is not deterministic #84
Comments
Thanks for your contribution! :) |
Hi @SkywaveTM , thanks for your feedback! :) I'm not very familiar with this issue, but is it related to this? |
Thanks for the reply :D Anyway, It seems that that is not relevant since I don't get any exceptions. The problem I faced is that after preparing fresh dev environments, set by cloning the repository and running |
Hi @SkywaveTM , What exactly is the conflict between sources? I have tried to follow your procedure to generate the code, but only got the following diffs.
Map<String, dynamic> _$$_InstanceActivityToJson(_$_InstanceActivity instance) {
+ final val = <String, dynamic>{};
+
+ void writeNotNull(String key, dynamic value) {
+ if (value != null) {
+ val[key] = value;
+ }
+ }
+
+ writeNotNull('week', const UnixTimestampConverter().toJson(instance.week));
+ writeNotNull('statuses', const IntConverter().toJson(instance.statusCount));
+ writeNotNull('logins', const IntConverter().toJson(instance.loginCount));
+ writeNotNull(
+ 'registrations', const IntConverter().toJson(instance.registrationCount));
+ return val;
} Is this the conflict you are referring to? |
Or maybe this message? [INFO] Found 93 declared outputs which already exist on disk. This is likely because the`.dart_tool/build` folder was deleted, or you are submitting generated files to your source repository.
Delete these files?
1 - Delete
2 - Cancel build
3 - List conflicts |
Yes, exactly (except that I got 89 conflicts). Maybe I had to include the whole outputs earlier :p outputs
|
Oh just a few minutes ago I ran https://github.com/mastodon-dart/mastodon-api/pull/87/files Basically, you can always use the latest dependencies, and also please select btw, are you interested in pull requests? I'm welcome to add endpoints or even improve the internal process :) There are few difficulties in adding endpoints, since a generic request mechanism and a mechanism for converting them to model objects already exist :) |
@all-contributors please add @SkywaveTM for ideas |
I've put up a pull request to add @SkywaveTM! 🎉 |
1. What could be improved
freeze
package, which is being used for generating model classes, could produces different outputs within the versions with the same major version (check commit history for that file). With current version constraints, auto generated codes are not deterministic since different versions offreezed
package could be used.You may reproduce this by playing with follwing commands -
dart pub upgrade
,dart pub downgrade
,dart run build_runner build
,dart run build_runner clean
2. Why should this be improved
Contributors may override exiting auto generated codes with auto generated codes in their environment.
3. Any risks?
You may need to manually upgrade
freeze
package.4. More information
The text was updated successfully, but these errors were encountered: