Re: Testing Rust code in tree

2020-05-11 Thread Lina Cambridge
Oooh, this question comes at a perfect time, the Glean team has been
looking at this recently in bug 1627024, too!

Nick's quote from the Oxidation wiki alludes to this, but, if your Rust
code is pulling in Gecko crates like `nsstring`, `xpcom`, and such, I don't
think `RUST_TESTS` will work—you'd have to write a GTest. There's been some
more discussion about that in bug 1628074 and bug 1373878 that came down to
"because of complicated reasons, you can't write Rust tests that link
against Gecko symbols". (Please correct me if that's no longer the case,
though!)

https://searchfox.org/mozilla-central/source/toolkit/library/gtest/rust has
a list of Rust GTests, and
https://searchfox.org/mozilla-central/source/xpcom/rust/gtest/nsstring is a
nice example of the glue needed to set one up.

Hope this helps!

Cheers,
~ lina

On Mon, May 11, 2020 at 3:54 PM Mike Hommey  wrote:

> On Mon, May 11, 2020 at 03:37:07PM -0700, Dave Townsend wrote:
> > Do we have any standard way to test in-tree Rust code?
> >
> > Context: We're building a standalone binary in Rust that in the future
> will
> > be distributed with Firefox and of course we want to test it. It lives
> > in-tree and while we could use something like xpcshell to drive the
> > produced executable and verify its effects it would be much nicer to be
> > able to use Rust tests themselves. But I don't see a standard way to do
> > that right now.
> >
> > Is there something, should we build something?
>
>
> https://searchfox.org/mozilla-central/rev/446160560bf32ebf4cb7c4e25d7386ee22667255/python/mozbuild/mozbuild/frontend/context.py#1393
>
> Mike
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Testing Rust code in tree

2020-05-11 Thread Mike Hommey
On Mon, May 11, 2020 at 03:37:07PM -0700, Dave Townsend wrote:
> Do we have any standard way to test in-tree Rust code?
> 
> Context: We're building a standalone binary in Rust that in the future will
> be distributed with Firefox and of course we want to test it. It lives
> in-tree and while we could use something like xpcshell to drive the
> produced executable and verify its effects it would be much nicer to be
> able to use Rust tests themselves. But I don't see a standard way to do
> that right now.
> 
> Is there something, should we build something?

https://searchfox.org/mozilla-central/rev/446160560bf32ebf4cb7c4e25d7386ee22667255/python/mozbuild/mozbuild/frontend/context.py#1393

Mike
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Testing Rust code in tree

2020-05-11 Thread Nicholas Nethercote
The Oxidation wiki  has this entry in
its FAQ :


*Q:* How are in-tree Rust crates tested?

*A:* In general we don't run tests for third-party crates; the assumption
is that these crates are sufficiently well-tested elsewhere. (Which means
that large test fixtures should be removed when vendoring third-party
crates, because they just bloat mozilla-central.) Mozilla crates can be
tested with cargo test by adding them to RUST_TESTS in
toolkit/library/rust/moz.build. Alternatively, you can write a GTest that
uses FFI to call into Rust code


I don't know how accurate or complete that is, but hopefully it's a start.
Feel free to update it if necessary.

Nick

On Tue, 12 May 2020 at 08:37, Dave Townsend  wrote:

> Do we have any standard way to test in-tree Rust code?
>
> Context: We're building a standalone binary in Rust that in the future will
> be distributed with Firefox and of course we want to test it. It lives
> in-tree and while we could use something like xpcshell to drive the
> produced executable and verify its effects it would be much nicer to be
> able to use Rust tests themselves. But I don't see a standard way to do
> that right now.
>
> Is there something, should we build something?
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Testing Rust code in tree

2020-05-11 Thread Dave Townsend
Aha, someone has pointed out that I skipped over rusttests, which don't
appear to be listed at
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Automated_testing, or
indeed anywhere in our various docs that I can see. I guess that makes it
my job?

On Mon, May 11, 2020 at 3:37 PM Dave Townsend  wrote:

> Do we have any standard way to test in-tree Rust code?
>
> Context: We're building a standalone binary in Rust that in the future
> will be distributed with Firefox and of course we want to test it. It lives
> in-tree and while we could use something like xpcshell to drive the
> produced executable and verify its effects it would be much nicer to be
> able to use Rust tests themselves. But I don't see a standard way to do
> that right now.
>
> Is there something, should we build something?
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Testing Rust code in tree

2020-05-11 Thread Dave Townsend
Do we have any standard way to test in-tree Rust code?

Context: We're building a standalone binary in Rust that in the future will
be distributed with Firefox and of course we want to test it. It lives
in-tree and while we could use something like xpcshell to drive the
produced executable and verify its effects it would be much nicer to be
able to use Rust tests themselves. But I don't see a standard way to do
that right now.

Is there something, should we build something?
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


happy bmo push day!

2020-05-11 Thread David Lawrence

the following changes have been pushed to bugzilla.mozilla.org:

(tag: https://github.com/mozilla-bteam/bmo/tree/release-20200511.1)

https://bugzil.la/1633846 : Enable retries for uploading attachments to S3 when 
an error occurs
https://bugzil.la/1636549 : Guided Bug Helper extension filing bugs with 
'normal' instead of '--' severity.
https://bugzil.la/1634342 : change links for security approval documents to 
source docs
https://bugzil.la/1594066 : reproducible "Can't use ARRAY(0x17340610) as a field 
name." when Custom Search used
https://bugzil.la/1635332 : [SECURITY] Upgrade Mojolicous to 8.42
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


SpiderMonkey Newsletter #4

2020-05-11 Thread Jan de Mooij
(This newsletter is also available on our blog
.)

SpiderMonkey is the JavaScript engine used in Mozilla Firefox. This
newsletter gives an overview of the JavaScript and WebAssembly work we’ve
done as part of the Firefox 76 and 77 Nightly cycles.
JavaScript  New contributors

   - Kousuke Takaki fixed bug 1601734
   , tidying up some
   naming.
   - Tuan fixed bug 1566116
   , deleting dead
   code.

 New features

   - *Firefox 76*: André updated
    ICU to version 66
   with support for Unicode 13 .
   - *Firefox 76*: numberingSystem and calendar for Intl objects can now be
   set through options
   .
   - *Firefox 77*: String.prototype.replaceAll is no longer Nightly-only
    and will ride the
   trains to release.
   - *Firefox 77 (Nightly-only)*: André implemented
    the Logical
   Assignment Operators
    proposal (adds
   the ||=, &&=, ??= operators).

️ Garbage Collection

   - Jon made  various
    changes
    to GC heuristics
   to avoid non-incremental GCs.
   - Steve landed 
   and enabled 
   incremental marking for WeakMaps, a big change that will help reduce long
   GC slices, but to reduce risk this was backed out for Firefox 77. We’re
   hoping this sticks in Firefox 78!
   - Jon made 
   tracing of ‘auto rooters’ faster. He also noticed regressions on Linux64
   from parallel unmarking and made
    performance
   improvements to fix that.
   - Jon optimized 
   tracing of certain DOM objects in Firefox by allowing per-Zone tracing
   instead of tracing all of them.
   - Jon fixed various OOM (out of memory) crashes by adding
    memory accounting
   for malloc buffers associated with nursery cells and by improving
    GC malloc
   triggers.
   - Steve updated 
   the static analysis for rooting hazards to GCC 9.

⏩ Regular expression engine update

Iain finished 
implementing  the
SpiderMonkey shims and JIT support
 for the new regular
expression engine and is planning to land these in the FF 78 cycle to switch
to  the new engine in
Nightly! This will bring

support for lookbehind assertions, the dotAll flag and unicode escape
sequences.

Iain has also started working on supporting named groups
 and match indices
.
 JSScript/LazyScript unification

With all the groundwork in place (see previous newsletters), Ted was able
to unify  JSScript
and LazyScript! Functions no longer require a separate LazyScript and
JSScript and delazification and relazification now happen in-place.

He then removed  the
LazyScript type completely and landed
 various follow-up
changes to take advantage of the new system.
❇️ Stencil

Stencil  is our
project to create an interface between the frontend (parser, bytecode
emitter) and the rest of the VM, decoupling those components. This lets us
improve performance, simplify a lot of code and improve bytecode caching.
It also makes it possible to rewrite our frontend in Rust (see SmooshMonkey
item below).

The team is making good progress:

   - Caroline split 
   the script flags into multiple categories so it’s easier to assert
   correctness and reason about them. She also
    made
    various
   

[desktop] Bugs logged by Desktop Release QA in the last 7 days

2020-05-11 Thread mihai.boldan

Hello,

Here's the list of new issues found and filed by the Desktop Release QA 
team in the last 7 days.
Additional details on the team's priorities last week, as well as the 
plans for the current week are available at: https://tinyurl.com/y7qogtfb.

Bugs logged by Desktop Release QA in the last 7 days:
*
*Firefox:Address Bar
* NEW - https://bugzil.la/1635044 - Link from address bar is auto 
selected for a short period after clicking homepage button while having 
a loaded page


Firefox: Installer
* RESOLVED FIXED - https://bugzil.la/1636445 - The update button is not 
visible while a high contrast theme is enbled


Firefox: New Tab Page
* NEW - https://bugzil.la/1635055 - Customize your New Tab page button 
remains in hovered state after being clicked


Firefox: Preferences
* RESOLVED WONTFIX - https://bugzil.la/1635040 - List for certificates 
manager has 1 additional space at the last element
* NEW - https://bugzil.la/1635057 - ETP Custom option - keep space with 
padding/margins between trackers and option dropdowns
* NEW - https://bugzil.la/1635073 - Using Tab key can select 
about:preferences page but has interrupted dotted line


Firefox: Session Restore
* NEW - https://bugzil.la/1636127 - [Ubuntu] Firefox UI becomes 
corrupted after session restore
* NEW - https://bugzil.la/1636372 - Tabs with play button are not 
remembering their previously muted state after restart the browser


Firefox: Theme
* RESOLVED WONTFIX - https://bugzil.la/1636450 - Library button can’t be 
clicked while Saved to Library hint is displayed


Firefox: Toolbars and Customization
* NEW - https://bugzil.la/1635105 - Firefox becomes unresponsive when 
more tools is closed while having search bar and forget window opened


Core: Graphics: WebGPU
* NEW - https://bugzil.la/1636034 - github.io/hectic-rs-wasm game not 
loading on Windows 10


Core: Layout
* NEW - https://bugzil.la/1635143 - Search logins in Firefox Lockwise 
quickly extends and retracts when the page is refreshed


Core: Networking: Cache
* NEW - https://bugzil.la/1636395 - Cache memory (Number of entries) is 
not always cleared when the policy is enabled


Core: Privacy: Anti-Tracking
* NEW - https://bugzil.la/1635145 - The button changes to "Signed in" 
with certain settings (Custom mode - All third-party cookies)


Core: WebRTC
* NEW - https://bugzil.la/1636063 - Calls between webroom.net are not 
working properly on Firefox


Toolkit: Video/Audio Controls
* NEW - https://bugzil.la/1636381 - Facebook videos stop after scrolling 
while in PiP mode


DevTools: Netmonitor
* NEW - https://bugzil.la/1636385 - Netmonitor blocking - Set context 
menu options to disabled_status if all options are Enabled or Disabled 
already


Mozilla Localization: ar / Arabic
* NEW - https://bugzil.la/1635116 - macOS - AR locale - Cancel button 
font text_descender not contained


This is available as a Bugzilla bug list as well: 
https://tinyurl.com/y9uvr6k5.


Regards,
Mihai Boldan


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform