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

Watch synapse-react-client & automatically copy resources #5621

Merged
merged 4 commits into from
Jan 27, 2025

Conversation

nickgros
Copy link
Contributor

No description provided.

pom.xml Outdated Show resolved Hide resolved
For some reason, my codeserver would occasionally create incorrect (stale?) .rpc files for DevMode after running `mvn clean compile`. Running `mvn clean package` would somehow fix this. I am hoping that moving the RPC assembly to the `package` step will prevent this from happening.

The error in the RPC response would read "Type name elision in RPC payloads is only supported if the RPC whitelist file is used." and the client could not deserialize it. I noticed that the .rpc file names generated by `mvn package` differed from those generated by `mvn compile`, so I am assuming this assembly step accounts for the difference.
Comment on lines +318 to +321
<watch>
<directory>${project.basedir}/src/main/webapp/css</directory>
<directory>${project.basedir}/src/main/webapp/sass</directory>
</watch>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Watch source SCSS and CSS files for changes

Comment on lines +314 to +316
<directory>
${project.basedir}/node_modules/synapse-react-client/dist/umd
</directory>
Copy link
Contributor Author

@nickgros nickgros Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Watch synapse-react-client for changes. We can update this list as needed; I didn't want to start with watching the entire node_modules folder (not sure of the performance implications of watching 80k+ files)

@@ -316,7 +342,7 @@
<execution>
<id>make-assembly</id>
<!-- this is used for inheritance merges -->
<phase>package</phase>
<phase>compile</phase>
Copy link
Contributor Author

@nickgros nickgros Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, my local instance of the GWT servlet would occasionally respond with esoteric failure messages on RPCs. The error in the RPC response would read "Type name elision in RPC payloads is only supported if the RPC whitelist file is used." and the client could not deserialize it. I have been having this issue for ages, with both Tomcat & Jetty, regardless of if I started the code server with the Maven plugin or the IntelliJ GWT extension.

Today I discovered that this was because my code server seemed to create incorrect (stale?) .rpc files for DevMode after running either mvn clean compile or mvn gwt:run. Running mvn clean package somehow fixed this. I noticed that the compiled .rpc file names generated after running mvn package differed from those generated by mvn compile, so I am assuming this assembly step accounts for the difference.

My working theory is that this assembly step is related and maybe updates some stale cache layer? I would appreciate more insight into this step if more context is available. I am hoping that moving the RPC assembly to the compile step will prevent this from happening in general.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also encountered stale rpc files that breaks GWT RPC (with the unable to deserialize client error). I wish I had more context to give, but I don't see any issues moving this to the compile step

@nickgros nickgros merged commit 2c059c2 into Sage-Bionetworks:develop Jan 27, 2025
3 checks passed
@jay-hodgson
Copy link
Member

Those force pushes are a bit scary (are you permanently deleting the correct commits?). I assume you know what you're doing, since I don't remember losing any upstream work (so my assumption is that you are deleting your own local commits). I feel it's our responsibility to raise the cautionary flag for this case, whether it's a real problem or not.

@nickgros
Copy link
Contributor Author

nickgros commented Jan 27, 2025

@jay-hodgson I'm only force-pushing over commits that are in my feature branches' history only, so shared history is untouched. Before my code has been reviewed, I'll often overwrite commits if I don't think that the sequence or commit messages provide useful context for anyone that might review the commit log (I especially do a lot of git commit -m "work in progress"). The habit also makes it easier to cherry-pick or split large PRs if I feel they have included too many separable changes for one review.

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.

2 participants