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

refactor: rename XR to XRSystem #25738

Merged
merged 1 commit into from Feb 24, 2020

Conversation

@jsjoeio
Copy link
Contributor

jsjoeio commented Feb 12, 2020

This PR renames XR to XRSystem.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #25732
  • There are tests for these changes OR
  • These changes do not require tests because it's the changing of a name (XR -> XRSystem)
@highfive
Copy link

highfive commented Feb 12, 2020

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @paulrouget (or someone else) soon.

@highfive
Copy link

highfive commented Feb 12, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webidls/XR.webidl, components/script/dom/xr.rs, components/script/dom/xrsession.rs
  • @KiChjang: components/script/dom/webidls/XR.webidl, components/script/dom/xr.rs, components/script/dom/xrsession.rs
@highfive
Copy link

highfive commented Feb 12, 2020

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@jsjoeio
Copy link
Contributor Author

jsjoeio commented Feb 12, 2020

Running into issues during the build process :(

When I run:

pip install virtualenv

I get this:

Requirement already satisfied: virtualenv in /usr/local/lib/python3.7/site-packages (20.0.2)
Requirement already satisfied: six<2,>=1.12.0 in /usr/local/lib/python3.7/site-packages (from virtualenv) (1.14.0)
Requirement already satisfied: distlib<1,>=0.3.0 in /usr/local/lib/python3.7/site-packages (from virtualenv) (0.3.
0)
Requirement already satisfied: filelock<4,>=3.0.0 in /usr/local/lib/python3.7/site-packages (from virtualenv) (3.0
.12)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in /usr/local/lib/python3.7/sit
e-packages (from virtualenv) (1.5.0)
Requirement already satisfied: appdirs<2,>=1.4.3 in /usr/local/lib/python3.7/site-packages (from virtualenv) (1.4.
3)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/site-packages (from importlib-metadata<2,>=0.
12; python_version < "3.8"->virtualenv) (2.2.0)

Then I run this ./mach build -d and get this:

Python virtualenv is not installed. Please install it prior to running mach.

I haven't dabbled in Python in a while so forgive me if this is a n00b question, but what am I doing wrong? It feels like a never ending loop 😂 I will dig deeper tomorrow but initial thought it that it has to do with Python 2.7 vs. Python 3 and the location of virtualenv and which one I'm using.

P.S. - if you do help, or if I figure it out, we can update the README with a "Troubleshooting a Mac environment" section ❤️

@Manishearth
Copy link
Member

Manishearth commented Feb 12, 2020

Can you remove the brewfile changes? Those are for CI. We can land this and perhaps open a second PR to improve docs on this.

@jdm
Copy link
Member

jdm commented Feb 12, 2020

With respect to the pip issue, try pip2 install virtualenv or some other binary that explicitly references the python2.7 pip binary, since pip appears to be part of the python3 distribution.

@jsjoeio jsjoeio force-pushed the jsjoeio:jsjoeio/issue-25732-rename-xr branch from 3641f1e to 9a6afad Feb 13, 2020
@jsjoeio
Copy link
Contributor Author

jsjoeio commented Feb 13, 2020

Okay, I removed the brewfile changes.

CI is still failing - but is that simply because I didn't write any unit tests? Looking at the logs, it seems like it's printing the diffs but I don't see any error messages or explanation as to why the task is failing.

@paulrouget
Copy link
Contributor

paulrouget commented Feb 13, 2020

It’s a formatting issue.

Run mach fmt.

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Feb 13, 2020

Here's the error from the task:

error[E0583]: file not found for module `XRSystemBinding`
   --> /repo/target/debug/build/script-bbd50c7c9ef66328/out/Bindings/mod.rs:382:9
    |
382 | pub mod XRSystemBinding;
    |         ^^^^^^^^^^^^^^^
    |
    = help: name the file either XRSystemBinding.rs or XRSystemBinding/mod.rs

So it doesn't like the name...best way to fix this?
Resolved

@jsjoeio jsjoeio marked this pull request as ready for review Feb 13, 2020
@jsjoeio
Copy link
Contributor Author

jsjoeio commented Feb 14, 2020

Question: is it possible to set up a pre-push hook that runs ./mach fmt? Wouldn't that save time?

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Feb 14, 2020

Okay...now this error is a bit more cryptic to me:

error[E0050]: method `RequestSession` has 4 parameters but the declaration in trait `dom::bindings::codegen::Bindings::XRSystemBinding::XRSystemBinding::XRSystemMethods::RequestSession` has 3
   --> components/script/dom/xrsystem.rs:165:9
    |
165 | /         &self,
166 | |         mode: XRSessionMode,
167 | |         init: RootedTraceableBox<XRSessionInit>,
168 | |         comp: InRealm,
    | |_____________________^ expected 3 parameters, found 4
    | 
   ::: /repo/target/debug/build/script-bbd50c7c9ef66328/out/Bindings/XRSystemBinding.rs:893:23
    |
893 |       fn RequestSession(&self, mode: XRSessionMode, parameters: RootedTraceableBox<crate::dom::bindings::codegen::Bindings::XRSystemBinding::XRSessionInit>) -> Rc<Promise>;
    |                         ----------------------------------------------------------------------------------------------------------------------------------- trait requires 3 parameters
error: aborting due to previous error

Any suggestions on how to resolve this?

@bors-servo
Copy link
Contributor

bors-servo commented Feb 15, 2020

The latest upstream changes (presumably #25770) made this pull request unmergeable. Please resolve the merge conflicts.

@jsjoeio jsjoeio force-pushed the jsjoeio:jsjoeio/issue-25732-rename-xr branch from 18622bb to 99bba7c Feb 17, 2020
Copy link
Member

Manishearth left a comment

Please squash your commits

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Feb 17, 2020

Thanks for approving! I'll squash now 👍🏼

I'm curious though, what's the advantage to having authors squash their commits as opposed to squashing as part of the PR merge process?

@jsjoeio jsjoeio force-pushed the jsjoeio:jsjoeio/issue-25732-rename-xr branch from 06d4aff to 6cbd87d Feb 17, 2020
@jdm
Copy link
Member

jdm commented Feb 18, 2020

This doesn't build yet:

error[E0405]: cannot find trait `XRMethods` in this scope
   --> components/script/dom/xrsystem.rs:119:6
    |
119 | impl XRMethods for XRSystem {
    |      ^^^^^^^^^ not found in this scope

It needs to implement (and import) XRSystemMethods instead.

As for the question about squashing, we use a bot that performs merges for us and it doesn't support squashing yet.

@jsjoeio jsjoeio force-pushed the jsjoeio:jsjoeio/issue-25732-rename-xr branch from fbc546e to 9c44603 Feb 19, 2020
@jdm
Copy link
Member

jdm commented Feb 24, 2020

@bors-servo r=Manishearth,jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 24, 2020

📌 Commit 30f4743 has been approved by Manishearth,jdm

@highfive highfive assigned Manishearth and unassigned jsjoeio Feb 24, 2020
bors-servo added a commit that referenced this pull request Feb 24, 2020
…hearth,jdm

refactor: rename XR to XRSystem

<!-- Please describe your changes on the following line: -->
This PR renames XR to XRSystem.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [X] These changes fix #25732

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's the changing of a name (XR -> XRSystem)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 24, 2020

Testing commit 30f4743 with merge fa26253...

@bors-servo
Copy link
Contributor

bors-servo commented Feb 24, 2020

💔 Test failed - status-taskcluster

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Feb 24, 2020

meme: not sure if nothing is broken or if everything is broken

@jdm
Copy link
Member

jdm commented Feb 24, 2020

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Feb 24, 2020

Testing commit 30f4743 with merge 5246463...

bors-servo added a commit that referenced this pull request Feb 24, 2020
…hearth,jdm

refactor: rename XR to XRSystem

<!-- Please describe your changes on the following line: -->
This PR renames XR to XRSystem.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [X] These changes fix #25732

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's the changing of a name (XR -> XRSystem)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 24, 2020

💔 Test failed - status-taskcluster

@CYBAI
Copy link
Collaborator

CYBAI commented Feb 24, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 24, 2020

Testing commit 30f4743 with merge 92f5b36...

@bors-servo
Copy link
Contributor

bors-servo commented Feb 24, 2020

☀️ Test successful - status-taskcluster
Approved by: Manishearth,jdm
Pushing 92f5b36 to master...

@bors-servo bors-servo merged commit 92f5b36 into servo:master Feb 24, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@jsjoeio jsjoeio deleted the jsjoeio:jsjoeio/issue-25732-rename-xr branch Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.