-
Notifications
You must be signed in to change notification settings - Fork 33
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
Apply WKT / _virtual_imports patch #155
base: master
Are you sure you want to change the base?
Conversation
We'll presumably need to add in the updates for the tests as well, but I was hoping to see if it passes the CI/CD pipeline first, since I've been having issues getting a dev env for this set up correctly. |
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 pending tests
I spent a bit of time this morning looking into this. It looks like we're running into the same 404 issue as in #11. Additionally, it looks like there are some new namespacing problems between @com_github_protocolbuffers_protobuf and @com_google_protobuf, stemming from upstream changes in those libraries. Could you take a look and let me know what you think needs to be done? Thanks! |
I'll take a look today |
OK, did a bit of debugging. Here's what I did: I ran the tests locally:
Running the test in debug mode should open a browser. You can see that it's requesting the timestamp proto js code and getting a 404:
That's a problem. The path should have the workspace name at the beginning. If you try going to So, why is it requesting the wrong code? We're adding the proto to the delivery person proto, so look at the generate code for it:
And you'll see:
The timestamp require doesn't have the workspace (unlike the next import, which has I believe it's coming from this code. Should we use the code in the npm library or update the code to reference the local generated version? |
Wow, this is a tough one! I did some more digging and it appears the test failures are being caused by the |
Yes, I think the problem is that we can't resolve the timestamp proto JS code. There are two place we can potentially fetch the code from:
I don't have a strong preference on which approach we use -- whichever requires less configuration for library users. |
I played around with idea one today. I was able to use the requireJS path mapping config to fix the 404 issue, at least. If we go that route, though, it looks like additional module transformation might need to be done (CommonJS -> UMD, iirc) due to the Idea two seems like it would work, but would presumably necessitate a bit of hardcoding. If you're all right with that, I think it could be done fairly easily by inserting it into the |
Yeah, I'm fine with some hard coding if you want to do option 2. Just leave a comment with a reference to the |
Based on #11
Sorry for the delay, @Dig-Doug !