Pioneer media app fixes and types updates#687
Conversation
|
I'm currently getting error in web console when running pioneer:
Will investiage |
|
Still work in progress, after all the refactoring in types will need to update pioneer. |
There was a problem hiding this comment.
The circular dependency problem is solved. I went through the changes and tested a few things:
- Checked almost all CLI commands (including the new
working-groupsone I merged into this branch) - found no issues - Tested Pioneer's forum, proposals, council election process etc. (functionalities where file changes were included) - found no issues
- Tested whether merging my new cli and Pioneer related changes doesn't cause any issues - it doesn't
- Whether this fixes the issue I encountered in
joystream-api-examples- it does (but an update in that repository is required) - Checked whether circular dependency detection tool doesn't detect any circular dependencies anymore - I used
madgetool here and it didn't detect any circular dependencies. I then purposefully created a circular dependency and re-build the types and it was succesfully detected, so the tool seems to be working fine. - Ran network tests (had to run
yarn installfirst though) - there were a few issues with transaction priority and timeouts, but didn't seem like anything related to the changes in this PR - Didn't fully test the media app yet as it would probably require some more setup (and I'm not sure if that's even possible already?)
I was thinking that it would be nice to have some additional CI checks included (not necessarily in this PR), ie.:
yarn workspace @joystream/types build(now that they are not part of Pioneer workspace anymore)- A script like
yarn workspace @joystream/types build && madge --circular typesto avoid circular dependencies in the future yarn workspace joystream-cli build(just to make sure CLI code compiles) Edit: that's actually only possible after #692 gets merged
| "bugs": "https://github.com/Joystream/substrate-runtime-joystream/issues", | ||
| "dependencies": { | ||
| "@joystream/types": "^0.10.0", | ||
| "@joystream/types": "./types", |
There was a problem hiding this comment.
Wouldn't this cause a problem if we decide to publish this package? (Similarly to "@joystream/types": "*"?)
There was a problem hiding this comment.
Yes it would indeed. I think we need to investigate what is the best practice inside a workspace. I did make you change a similar import once with '*' for the same reason :)
We really need to look into lerna and if it perhaps helps to resolve the correct version at the point when we actually publish.
@Gamaranto is exploring using lerna now while working on atlas.
It is worth mentioning also that he used it to build packages in the correct order based on the dependency tree. Maybe it could also help to detect circular dependencies in general?
Yes, I had an issue for nicea to add some new CI checks here #664 will add your suggestions to it. |
Part of #663 - excluding resolver cache improvements
types/index.ts- move council and election types into separate file, common types into common.tsTried to identify as many cases of circular references as possible.