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

Convert imports in generate_imports into one per line, so that it can… #13070

Merged
merged 1 commit into from Aug 27, 2016

Conversation

@tp6vup54
Copy link
Contributor

tp6vup54 commented Aug 27, 2016

Convert imports in generate_imports into one per line, so that it can easily add new ones with alphabetical order.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #13036 (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

… easily add new ones with alphabetical order.


This change is Reviewable

'dom::types::*',
'js::error::throw_type_error',
'js::jsapi::JSContext',
'js::jsapi::{HandleValue, MutableHandleValue}',
'js::jsapi::HandleValue',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Looks like this line should be above the previous line.

@@ -5321,95 +5324,216 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries

return CGImports(cgthings, descriptors, callbacks, dictionaries, enums, [
'js',
'js::{JS_CALLEE, JSCLASS_GLOBAL_SLOT_COUNT}',
'js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL, JSCLASS_RESERVED_SLOTS_MASK}',
'js::JS_CALLEE',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

_ is greater than C, so this should be put after the js::JSCLASS_* declarations.

'js::jsapi::JS_SetImmutablePrototype',
'js::jsapi::JS_SetProperty',
'js::jsapi::JS_SetReservedSlot',
'js::jsapi::JS_SplicePrototype',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Same problem as above - _ is greater than any Latin capital letters.

'std::borrow::ToOwned',
'std::cmp',
'std::mem',
'std::num',
'std::os',
'std::panic::{self, AssertUnwindSafe}',
'std::panic::{self}',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Remove braces here.

This comment has been minimized.

Copy link
@tp6vup54

tp6vup54 Aug 27, 2016

Author Contributor

If braces are removed here, there will be an error occurred.

error[E0429]:selfimports are only allowed within a { } list

Seems like the braces cannot be removed?

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Ah, right, you need to remove ::{self} entirely, i.e. the final declaration would look like std::panic.

'js::jsval::ObjectValue',
'js::jsval::ObjectOrNullValue',
'js::jsval::PrivateValue',
'js::jsval::NullValue',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

N comes before O.

'js::jsval::NullValue',
'js::jsval::UndefinedValue',
'js::glue::CallJitMethodOp',
'js::glue::CallJitGetterOp',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

G comes before M.

'js::glue::NewProxyObject',
'js::glue::ProxyTraps',
'js::glue::RUST_JSID_IS_STRING',
'js::glue::int_to_jsid',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Lowercase letters after uppercase.

'dom::bindings::interface::define_guarded_properties',
'dom::bindings::interface::is_exposed_in',
'dom::bindings::interface::ConstantVal::IntVal',
'dom::bindings::interface::ConstantVal::UintVal',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put before InterfaceConstructorBehavior.

'dom::bindings::interface::ConstantVal::IntVal',
'dom::bindings::interface::ConstantVal::UintVal',
'dom::bindings::iterable::IteratorType',
'dom::bindings::iterable::Iterable',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put above IteratorType.

'dom::bindings::js::JS',
'dom::bindings::js::Root',
'dom::bindings::js::RootedReference',
'dom::bindings::js::OptionalRootedReference',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put above Root.

'dom::bindings::callback::CallbackContainer',
'dom::bindings::callback::CallbackInterface',
'dom::bindings::callback::CallbackFunction',
'dom::bindings::callback::CallSetup',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put above CallbackContainer.

'dom::bindings::conversions::ConversionResult',
'dom::bindings::conversions::DOM_OBJECT_SLOT',
'dom::bindings::conversions::IDLInterface',
'dom::bindings::conversions::is_array_like',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put above jsid_to_str.

'dom::bindings::conversions::ConversionBehavior',
'dom::bindings::conversions::ConversionResult',
'dom::bindings::conversions::DOM_OBJECT_SLOT',
'dom::bindings::conversions::IDLInterface',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put above StringificationBehavior.

'dom::bindings::conversions::native_from_handlevalue',
'dom::bindings::conversions::native_from_object',
'dom::bindings::conversions::private_from_object',
'dom::bindings::conversions::root_from_object',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put after root_from_handlevalue.

'dom::bindings::codegen::PrototypeList',
'dom::bindings::codegen::RegisterBindings',
'dom::bindings::codegen::UnionTypes',
'dom::bindings::error::Fallible',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put after ErrorResult.

'dom::browsingcontext::BrowsingContext',
'mem::heap_size_of_raw_self_and_children',
'libc',
'util::prefs::PREFS',
'script_runtime::{store_panic_result, maybe_take_panic_result}',
'script_runtime::store_panic_result',

This comment has been minimized.

Copy link
@KiChjang

KiChjang Aug 27, 2016

Member

Put after maybe_take_panic_result.

@KiChjang
Copy link
Member

KiChjang commented Aug 27, 2016

Looks great! All that's left now is to squash your commits into one.

… easily add new ones with alphabetical order.
@tp6vup54 tp6vup54 force-pushed the tp6vup54:master branch from 11a430a to 59dcb31 Aug 27, 2016
@shinglyu shinglyu modified the milestone: Taiwan Code Sprint Aug 27, 2016
@jdm
Copy link
Member

jdm commented Aug 27, 2016

@bors-servo: r=KiChjang

@bors-servo
Copy link
Contributor

bors-servo commented Aug 27, 2016

📌 Commit 59dcb31 has been approved by KiChjang

@bors-servo
Copy link
Contributor

bors-servo commented Aug 27, 2016

Testing commit 59dcb31 with merge 85838c0...

bors-servo added a commit that referenced this pull request Aug 27, 2016
Convert imports in generate_imports into one per line, so that it can…

<!-- Please describe your changes on the following line: -->
Convert imports in generate_imports into one per line, so that it can easily add new ones with alphabetical order.

---
<!-- 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 #13036 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

… easily add new ones with alphabetical order.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13070)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 27, 2016

💔 Test failed - mac-rel-wpt

@highfive
Copy link

highfive commented Aug 27, 2016

  ▶ TIMEOUT [expected PASS] /_mozilla/css/iframe/hide_layers2.html
@KiChjang
Copy link
Member

KiChjang commented Aug 27, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Aug 27, 2016

Testing commit 59dcb31 with merge 1fd2577...

bors-servo added a commit that referenced this pull request Aug 27, 2016
Convert imports in generate_imports into one per line, so that it can…

<!-- Please describe your changes on the following line: -->
Convert imports in generate_imports into one per line, so that it can easily add new ones with alphabetical order.

---
<!-- 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 #13036 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

… easily add new ones with alphabetical order.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13070)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 27, 2016

@bors-servo bors-servo merged commit 59dcb31 into servo:master Aug 27, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
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.

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