You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I currently get this message when I build servo with ./mach build --dev:
Compiling style v0.0.1 (file:///home/olmanz/Schreibtisch/workspaces/Rust/servo/components/style)
error[E0061]: this function takes 1 parameter but 2 parameters were supplied
--> /home/olmanz/Schreibtisch/workspaces/Rust/servo/target/debug/build/style-fe2cedc35103ef47/out/properties.rs:7826:40
|
7826 | specified::Overflow::parse(context, input)
| ^^^^^^^^^^^^^^ expected 1 parameter
|
::: components/style/values/specified/box.rs
|
128 | / define_css_keyword_enum! { Overflow:
129 | | "visible" => Visible,
130 | | "hidden" => Hidden,
131 | | "scroll" => Scroll,
132 | | "auto" => Auto,
133 | | }
| |_- defined here
|
= note: this error originates in a macro outside of the current crate
error[E0061]: this function takes 1 parameter but 2 parameters were supplied
--> /home/olmanz/Schreibtisch/workspaces/Rust/servo/target/debug/build/style-fe2cedc35103ef47/out/properties.rs:7937:40
|
7937 | specified::Overflow::parse(context, input)
| ^^^^^^^^^^^^^^ expected 1 parameter
|
::: components/style/values/specified/box.rs
|
128 | / define_css_keyword_enum! { Overflow:
129 | | "visible" => Visible,
130 | | "hidden" => Hidden,
131 | | "scroll" => Scroll,
132 | | "auto" => Auto,
133 | | }
| |_- defined here
|
= note: this error originates in a macro outside of the current crate
error: aborting due to 2 previous errors
error: Could not compile `style`.
To learn more, run the command again with --verbose.
[Warning] Could not generate notification! Optional Python module 'dbus' is not installed.
Build FAILED in 0:01:14
I found out that the file /target/debug/build/style-fe2cedc35103ef47/out/properties.rs is created by components/style/properties/build.py, but I'm not quite sure how to get rid of this error message.
Ok I've started out on a similar foot to olmanz and used overscroll-behaviour as an example to mimic.
So far I'm passing only a subset of the params into predefined_type and ./mach build seems to work fine but of course I've not taken care of the gecko bit yet so the gecko build breaks.
I'm just stuck here, I'm really not sure how to deal with some of these params. For instance, I've tried sending gecko_constant_prefix into predefined_type and I get: TypeError: __init__() got an unexpected keyword argument 'gecko_constant_prefix' - triggered by line 455 in declare_longhand.
(sorry I'm working on another PC and don't have the full error msg with me)
So I'm wondering, am I trying to get things like gecko_constant_prefix, custom_consts etc. into predefined_type as well? Is it appropriate to use the single_keyword function to handle the gecko stuff? Sorry, still trying to understand how the code is working.
So I'm wondering, am I trying to get things like gecko_constant_prefix, custom_consts etc. into predefined_type as well? Is it appropriate to use the single_keyword function to handle the gecko stuff? Sorry, still trying to understand how the code is working.
Sorry I missed this before, you should stop using gecko_constant_prefix into predefined_type, and then write the conversion manually like we do for other keywords, like overscroll-behavior.
In gecko build I get the following error coming from set_overflow_y in gecko.mako.rs
Still trying to figure out what overflow_x.keyword is doing
Traceback (most recent call last):
...
File "/home/nick/Desktop/servo/components/style/properties/gecko.mako.rs", line 1535, in render_impl_trait
${caller.body().strip()}
File "/home/nick/Desktop/servo/components/style/properties/gecko.mako.rs", line 3105, in body
$ for value in overflow_x.keyword.values_for('gecko'):
AttributeError: 'NoneType' object has no attribute 'values_for
@nicknadeau: So that error means that overflow_x.keyword is None, which is expected because we're using predefined_type instead of keyword. That's fine, and the only thing that needs to happen is defining the keyword ourselves like overflow_behavior does:
Activity
olmanz commentedon Nov 21, 2017
@jdm
If it's OK for you, I can try this one.
KiChjang commentedon Nov 21, 2017
@olmanz I believe @PeterZhizhin is already working on this.
emilio commentedon Nov 21, 2017
Yeah, note that this one is actually extra-tricky.
KiChjang commentedon Nov 22, 2017
@PeterZhizhin Do you need any help? Any questions?
highfive commentedon Nov 29, 2017
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the
#servochannel in IRC.If you intend to work on this issue, then add
@highfive: assign meto your comment, and I'll assign this to you. 😄KiChjang commentedon Nov 29, 2017
Unassigning due to lack of response. This issue is now open for anyone to work on!
olmanz commentedon Nov 29, 2017
@highfive: assign me
highfive commentedon Nov 29, 2017
Hey @olmanz! Thanks for your interest in working on this issue. It's now assigned to you!
olmanz commentedon Nov 30, 2017
@KiChjang @emilio
I already moved some stuff outside of Mako, as you can see in this commit on my fork:
olmanz@6f0e69f
However, I currently get this message when I build servo with
./mach build --dev:I found out that the file /target/debug/build/style-fe2cedc35103ef47/out/properties.rs is created by components/style/properties/build.py, but I'm not quite sure how to get rid of this error message.
CYBAI commentedon Dec 1, 2017
I think the root cause is the
parsemethod duplicated betweendefine_css_keyword_enummacro andadd_impls_for_keyword_enummacro.The
define_css_keyword_enumis defined understyle_traits/values.rsand it willimplyour enum with aparsemethod with only one argument.servo/components/style_traits/values.rs
Lines 388 to 416 in b7bb6ff
The
add_impls_for_keyword_enumis defined undermacro.rsand it willimpl Parsewhich will need two arguments.servo/components/style/macros.rs
Lines 107 to 127 in b7bb6ff
Thus, when the
predefined_typecreate the file,servo/components/style/properties/helpers.mako.rs
Lines 36 to 48 in b7bb6ff
it will generate the file with
specified::Overflow::parse(context, input).So, all you need is passing needs_context=False in
predefined_type.You can reference to
ScrollSnapTypeorOverscrollBehaviorwhich are also inbox.mako.rs.olmanz commentedon Dec 1, 2017
Thanks, that worked!
olmanz commentedon Dec 1, 2017
Pull Request is out.
#19448
11 remaining items
emilio commentedon Feb 18, 2018
Sounds great, no worries, and thanks! :)
nicknadeau commentedon Feb 22, 2018
Ok I've started out on a similar foot to olmanz and used overscroll-behaviour as an example to mimic.
So far I'm passing only a subset of the params into predefined_type and
./mach buildseems to work fine but of course I've not taken care of the gecko bit yet so the gecko build breaks.I'm just stuck here, I'm really not sure how to deal with some of these params. For instance, I've tried sending gecko_constant_prefix into predefined_type and I get:
TypeError: __init__() got an unexpected keyword argument 'gecko_constant_prefix'- triggered by line 455 in declare_longhand.(sorry I'm working on another PC and don't have the full error msg with me)
So I'm wondering, am I trying to get things like gecko_constant_prefix, custom_consts etc. into predefined_type as well? Is it appropriate to use the single_keyword function to handle the gecko stuff? Sorry, still trying to understand how the code is working.
62mkv commentedon Feb 22, 2018
maybe someone removes E-easy label ? judging by history it's "anything but" easy
nicknadeau commentedon Feb 22, 2018
Well to be fair I've only spent ~2 hours on this so far, I'll keep tracing things and see what I can figure out.
emilio commentedon Feb 22, 2018
FWIW, it should be easier now, the relevant prerequisites have already landed, like #19578.
emilio commentedon Feb 22, 2018
Sorry I missed this before, you should stop using
gecko_constant_prefixintopredefined_type, and then write the conversion manually like we do for other keywords, likeoverscroll-behavior.nicknadeau commentedon Feb 25, 2018
My progress so far:
https://github.com/nicknadeau/servo/commit/97d138dc370e542e5ec0ef04b31541da37238732
https://github.com/nicknadeau/servo/commit/ed6524aa94b03d248bbd90885c7f117e06c66098
In gecko build I get the following error coming from set_overflow_y in gecko.mako.rs
Still trying to figure out what overflow_x.keyword is doing
nicknadeau commentedon Mar 21, 2018
I'm sorry guys, I really don't know how to progress from here, I don't understand enough of this code base in terms of the gecko stuff
jdm commentedon Mar 22, 2018
@emilio This is probably going to need your attention to answer the previous question.
emilio commentedon Mar 22, 2018
Oh, sorry, thanks!
@nicknadeau: So that error means that
overflow_x.keywordisNone, which is expected because we're usingpredefined_typeinstead ofkeyword. That's fine, and the only thing that needs to happen is defining the keyword ourselves like overflow_behavior does:https://searchfox.org/mozilla-central/rev/c217fbde244344fedfd07b57a740c694a456dbca/servo/components/style/properties/gecko.mako.rs#3423
PhilParisot commentedon Jul 2, 2020
Hey @emilio and @jdm, I'd like to try and attempt this issue if that's OK with you. I just finished reading the book.
I'll say hi on #servo on Matrix.
Let me know!
Thanks!
emilio commentedon Jul 2, 2020
I think this was effectively done in https://bugzilla.mozilla.org/show_bug.cgi?id=1470695. @jdm do you have any other potential good first issue for @PhilParisot?