Commit Graph

726 Commits

Author SHA1 Message Date
generatedunixname89002005325672
36cb69e1fd Daily arc lint --take KTFMT
Reviewed By: martintrojer

Differential Revision: D50964272

fbshipit-source-id: 1bdfffd1b32f76f2a81e95c6a59e15805a3a9436
2023-11-03 07:00:14 -07:00
Luke De Feo
3bb3ce6a66 Fix media gallery activity
Summary:
Weird edge case, this activity doesnt actualy contain the content and instead its in the decor view behind it, solution is to filter it out from traversal and snapshot

https://fb.workplace.com/groups/443457641253219/permalink/643518977913750/

Reviewed By: elboman, lblasa

Differential Revision: D50936817

fbshipit-source-id: 8c1e276d4d943c42c9c2085bf70113347cbd5c74
2023-11-02 12:29:07 -07:00
Luke De Feo
62e9181075 Improve logging
Summary: Lets make the logging higher signal

Reviewed By: passy

Differential Revision: D50853449

fbshipit-source-id: 95ebfbc142c34c36fb11e459c573842580cd6e4c
2023-11-02 12:29:07 -07:00
Luke De Feo
bd6e1285da Only pixel copy if view is hardwell accell
Summary:
You can only use pixel copy if the view is drawn by the hardware, this sort of makes sense as there is no hardware buffer to copy from.

we were falling back but there was a lot of noise in the logs

Reviewed By: lblasa

Differential Revision: D50853427

fbshipit-source-id: 9365a3d566a05de9082afb8bc2915922c624fd88
2023-11-02 12:29:07 -07:00
Luke De Feo
44b8a39874 remove common package
Summary: Just cleaning up some packages

Reviewed By: lblasa

Differential Revision: D50849169

fbshipit-source-id: 2b732e41ff11361dc7462598f282abb2d4116ce7
2023-11-02 12:29:07 -07:00
Luke De Feo
5b89331ea2 Fix case where traversal was out of sync with snapshot
Summary:
Its was possible for the view tree observer to be observing one root but this can a dead root with no view in it. As a result the snapshot will be empty and the observer will never fire.

The layout traversal Applicaiton ref descriptor had logic to handle these dead roots, this logic is now extracted and shared between the descriptor in the traversal and by the decor view tracker so they are in sync

Reviewed By: lblasa

Differential Revision: D50848155

fbshipit-source-id: ce6da13df40632cbb7a302a59382b4907131d9f5
2023-11-02 12:29:07 -07:00
Luke De Feo
d26612d840 Add modern snapshot approach
Summary:
Since api level 34 there is a way to snapshot any view, prior to this you needed a window which you can only get from an activity, or a surface which required hacks. The hacks are in place for older verisons of android but ive added modern pixel copy snapshotter for future proofing in case google decide to make any of the previously used hack not work in future version of android

Since there was a bunch of common code in each snap shot impl this has been pull into a utility function

Reviewed By: lblasa

Differential Revision: D50845284

fbshipit-source-id: c7910c45ff51fcf8636adc3d7272198ac3d4aefe
2023-11-02 12:29:07 -07:00
Luke De Feo
6e64f53046 Support pixel copy on views attached directly to window manager
Summary:
As mentioned in the previous diff pixel copy only support copying a Window, Surface or SurfaceView, All of these underneath use surface.

For views attached to the window manager there is no activity / window so we need another solution

There is no official way to get a views underlying surface so we had to do some dirty hacks to get it from the window manager. See the inline comments for details.

Additionally it turns out that the pixel copy api was actually made async in Android 34, so to prepare for this the snapshot method was made a suspend function and we wrap the callback based apit with suspendCoroutine.

Reviewed By: lblasa

Differential Revision: D50845281

fbshipit-source-id: 5ba8ed6f330c1e04549812a6493ae5f4cb629d1f
2023-11-02 12:29:07 -07:00
Luke De Feo
d85adc030f Use pixel copy on activities
Summary:
Pixel copy is a more reliable and consistent way to take a snapshot rather than drawing into a canvas. It accepts either:

Surface
SurfaceView
Window

For root views that belong to an activity its easy to get the window so we do that here.

In the next diff we solve this for other root views

Reviewed By: lblasa

Differential Revision: D50845282

fbshipit-source-id: 3968828dedd1e96a854b907e0fd152ad64993d95
2023-11-02 12:29:07 -07:00
Luke De Feo
6bf93347ee Extracted snapshot out of descriptor
Summary: Snapshot never made much sense in the descriptor since we only snapshot the decor views. Additionally in the next diff i will introduce a new way to snapshot so this will make it easier

Reviewed By: lblasa

Differential Revision: D50845280

fbshipit-source-id: c2eac351b72786e7b66951d0fa09cea52a6dcc69
2023-11-02 12:29:07 -07:00
Luke De Feo
c93c494ef4 Refactor android view observation
Summary:
The previous approach was designed for a world that didnt happen and was extremely confusing and allowed for states that didnt make a lot of sense. E.g it was possible we were snapshotting multiple views.

The new model is much simpler. we still depend on the root view resolver to tell us about root decor views but now we just attach a predraw listener to the top most view and push out the updates. This is handled by the new class decor view tracker which is a replacement for all the observer business

Additionally we use a conflated chanel in the update queue, this means if the background processing is slow we wont keep adding new frames to the queue, we just keep 1 and the most recent frame

Partial layout traversal -> Layout traversal as traversal is now always from top to bottom of the whole application

Reviewed By: lblasa

Differential Revision: D50791527

fbshipit-source-id: 43640723aefa775aa7b74065f405cc08224ed8b8
2023-11-02 12:29:07 -07:00
generatedunixname89002005325672
e72dcbb28d Daily arc lint --take KTFMT
Reviewed By: martintrojer

Differential Revision: D50925513

fbshipit-source-id: 1b964b758c53d6d490bd6c7f76d003c0afecfc70
2023-11-02 03:41:53 -07:00
Luke De Feo
9f78eb3f00 Fix NPE in text descriptor
Summary: Apparantly this can be null, we have received traversal errors with this in the stacktrace

Reviewed By: adityasharat

Differential Revision: D50839760

fbshipit-source-id: 8e43f35b2adfa91358924b1e162c53c50b0d855d
2023-11-01 06:41:55 -07:00
Luke De Feo
620b41b691 Fix npe crash in visibility check
Summary:
https://fb.workplace.com/groups/443457641253219/permalink/1716178925529425/

we had this stack trace which i belive is because we are accessing the litho view after its been unmounted, this is possible as the attributes fetching is async. To fix we move this part to be sync on the main thread

ui-debugger] Client error during traversal:  {\n  \"nodeName\": \"DeferredProcessing\",\n  \"errorType\": \"NullPointerException\",\n  \"errorMessage\": \"Attempt to invoke virtual method 'com.facebook.rendercore.extensions.ExtensionState com.facebook.litho.LithoHostListenerCoordinator.getVisibilityExtensionState()' on a null object reference\",\n  \"stack\": \"java.lang.NullPointerException: Attempt to invoke virtual method 'com.facebook.rendercore.extensions.ExtensionState com.facebook.litho.LithoHostListenerCoordinator.getVisibilityExtensionState()' on a null object reference\\n\\tat com.facebook.litho.LithoView.getVisibilityExtensionState(LithoView.java:710)\\n\\tat com.facebook.litho.DebugComponent$Companion.isVisible(DebugComponent.kt:406)\\n\\tat com.facebook.flipper.plugins.uidebugger.litho.descriptors.DebugComponentDescriptor.getMountingData(DebugComponentDescriptor.kt:182)\\n\\tat com.facebook.flipper.plugins.uidebugger.litho.descriptors.DebugComponentDescriptor.access$getMountingData(DebugComponentDescriptor.kt:32)\\n\\tat com.facebook.flipper.plugins.uidebugger.litho.descriptors.Debug

Reviewed By: adityasharat

Differential Revision: D50843793

fbshipit-source-id: 8c1df8b291371fd379cb819df33ed933f36026a6
2023-11-01 06:41:55 -07:00
Brett Lavalla
254110bf02 Make 'none' AccessibilityRole return the class for View
Summary:
This changes the default behavior for a "NONE" accessibility role to match Googles implementation in ExploreByTouchHelper (https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/com/android/internal/widget/ExploreByTouchHelper.java;drc=c7585d0e2f27f00c47802a78422228a81cf2c939;l=56?q=ExploreByTouchHelper).

This also matches ReactNative's default behavior here as well:
https://www.internalfb.com/code/fbsource/[199b5d1c47b224f2891b8cba33da90c5c8714a81]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java?lines=291

A role of "View" is a no-op behind the scenes for accessibility services, but making this a valid string rather than `null` will prevent potential crashed from systems expecting a string value to always exist from the "getClassName" method.

For context on how large of a potential problem this is, see this post:
https://fb.workplace.com/groups/sbteng/posts/1396301817590446

Reviewed By: ikenwoo

Differential Revision: D50864782

fbshipit-source-id: 8b176ed9427f62a1d039b012d10ea889df4777e3
2023-11-01 05:46:53 -07:00
Pascal Hartig
43530e3bbf Upgrade compose deps (#5247)
Summary:
[android][sample] Upgrade compose deps
Was dependent on SDK 34.

Pull Request resolved: https://github.com/facebook/flipper/pull/5247

Test Plan:
 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/5247).
* __->__ https://github.com/facebook/flipper/issues/5247
* https://github.com/facebook/flipper/issues/5246
* https://github.com/facebook/flipper/issues/5245

Reviewed By: lblasa

Differential Revision: D50599220

Pulled By: passy

fbshipit-source-id: 54038274ba894264c4027e48799ce6d0ceda4e82
2023-11-01 03:38:11 -07:00
generatedunixname89002005325672
9aadcefbf9 Daily arc lint --take KTFMT
Reviewed By: martintrojer

Differential Revision: D50729003

fbshipit-source-id: b739c041af3edb9ae7f787368938b23ae8efe4d0
2023-10-27 01:34:53 -07:00
Luke De Feo
92e831cc40 Promote k state to top level
Summary:
In the new sidebar design complex types are behind a preview. before states was an array under the key states.

Now we create a top level attribute according to its index

Reviewed By: lblasa

Differential Revision: D50654698

fbshipit-source-id: 410c50c5f1ab14efc77184a5b147d9bdf70761d4
2023-10-26 11:29:30 -07:00
Luke De Feo
cdb96df06f Litho layout prop improvements
Summary:
A few fixes.

1. We were ignoring start and end inputs, they are now sent to desktop
2. we were computing our own version of the resolved (computed ) values for border padding and margin. We are now using the correct about from litho getLayoutX

Removed some code duplication

Unfortunatley getLayoutBorderWidth is not available in open source yet so will need to land that first

Reviewed By: adityasharat

Differential Revision: D50496369

fbshipit-source-id: 7960a5d338adb40175f48982150665e046688fe1
2023-10-24 06:22:20 -07:00
Luke De Feo
21057fba01 Fix null pointer error
Summary: Turns out this can be null in some rare circumstances and can cause a crash in the fragment tracker

Reviewed By: aigoncharov

Differential Revision: D50562123

fbshipit-source-id: 4dfaecfde69359a85b778fc5ff0a4a3a8165a875
2023-10-24 05:49:56 -07:00
Joshua Selbo
cd4640326c Update tests on old SDK versions
Summary:
Preparing for next Robolectric version which drops support for SDK 16-18.

`MemoryToolsFlipperPluginTest` relies on JSON serialization order which changes when running on the latest SDK (33).

`InspectorFlipperPluginTest` has multiple issues when running on the latest SDK, so just bump it to 19.

Reviewed By: jiawei-lyu

Differential Revision: D50558702

fbshipit-source-id: 9724d8e699b703a9e0af12559c41e7053d820150
2023-10-23 11:02:31 -07:00
Luke De Feo
ee7f12ef85 Add message when traversal has error
Summary: By sending a message to the desktop we can report to log view and inform the user what happened

Reviewed By: lblasa

Differential Revision: D50369853

fbshipit-source-id: b4852d736232477261bfdf6f94c9395ce29cceaf
2023-10-19 03:33:42 -07:00
generatedunixname89002005325672
6251c58154 Daily arc lint --take KTFMT
Reviewed By: hick209

Differential Revision: D49534542

fbshipit-source-id: 122e7e2ca3070176dc9b510b6deefbb9fe71de11
2023-09-22 08:50:37 -07:00
Luke De Feo
3b8e03e94d fix open source
Summary: these constants are not in the latest release and has broken the build

Reviewed By: adityasharat

Differential Revision: D49455455

fbshipit-source-id: d84b3d214907de197e166130d1c8911a5e0db3c2
2023-09-21 05:10:03 -07:00
Luke De Feo
c3ad4f7180 Send warning when bloks tree not prepared
Summary: Give the user something actionable when tree is not ready due to flipper connected check failing

Reviewed By: lblasa

Differential Revision: D49455254

fbshipit-source-id: 8869cacde5b65260f4615f5ba2ba34f967d7d27f
2023-09-20 05:45:30 -07:00
Pascal Hartig
b808c4f9df Display fresco image on demand (#5160)
Summary:
[android][sample] Display fresco image on demand

Pull Request resolved: https://github.com/facebook/flipper/pull/5160

Reviewed By: antonk52

Differential Revision: D49411927

Pulled By: passy

fbshipit-source-id: 05d83d49df56f1e7eced2ce35d29880c9876b524
2023-09-20 03:55:40 -07:00
Pascal Hartig
7f355dd19d Back out "Disable Fresco integration for now (#5101)" (#5159)
Summary:
Back out "Disable Fresco integration for now (https://github.com/facebook/flipper/issues/5101)"

Original commit changeset: 42b95c21eb

This is now working again with Fresco 3.1.0

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/5159).
* https://github.com/facebook/flipper/issues/5160
* __->__ https://github.com/facebook/flipper/issues/5159
* https://github.com/facebook/flipper/issues/5158

Pull Request resolved: https://github.com/facebook/flipper/pull/5159

Reviewed By: antonk52

Differential Revision: D49411925

Pulled By: passy

fbshipit-source-id: 34a422e60102de56fb6588e05cf4729a30e0e112
2023-09-19 06:16:13 -07:00
Pascal Hartig
b0f9da8ed7 Bump fresco to 3.1.0 (#5158)
Summary:
[android] Bump fresco to 3.1.0

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/5158).
* https://github.com/facebook/flipper/issues/5160
* https://github.com/facebook/flipper/issues/5159
* __->__ https://github.com/facebook/flipper/issues/5158

Pull Request resolved: https://github.com/facebook/flipper/pull/5158

Reviewed By: antonk52

Differential Revision: D49411899

Pulled By: passy

fbshipit-source-id: b3a7a02a61665425c5c59a04d82941d0cbbea254
2023-09-19 06:15:20 -07:00
Luke De Feo
d7f8ed5d81 Fix broken attribution of mount events
Summary: The string were out of sync so using the constants instead

Reviewed By: fabiocarballo

Differential Revision: D49414046

fbshipit-source-id: 5d61831505e5d7ecec3d5c9717d4549ba4b291a8
2023-09-19 06:14:25 -07:00
Nate Stedman
ef621b07b7 Update ktfmt component on FBS:master
Reviewed By: hick209

Differential Revision: D49300079

fbshipit-source-id: 7e704e2366feee3f6f2c25ac25d3daea407e71f9
2023-09-15 07:19:43 -07:00
Aditya Sharat
00c203efc3 Renames debug event attributes to be more consistent
Summary: Renames debug event attributes to be more consistent

Reviewed By: pentiumao

Differential Revision: D49269291

fbshipit-source-id: 88fe3607bdfc58b941897a5dcc00f20bdb98fea3
2023-09-14 07:45:23 -07:00
Aditya Sharat
134e1f6bfa Renames debug event attributes and deduplicate them
Summary: Renames debug event attributes and deduplicate them

Reviewed By: pentiumao

Differential Revision: D49268777

fbshipit-source-id: 62f707424bb62e95a0d372307e7bf71ff770e554
2023-09-14 07:45:23 -07:00
Aditya Sharat
ba94a2416c Renames global key to key
Summary: Renames global key to key

Reviewed By: pentiumao

Differential Revision: D49268637

fbshipit-source-id: 9c3e11ce78380048eed75d554170319e81892efd
2023-09-14 07:45:23 -07:00
Pascal Hartig
0900a2a41d Export android plugin to OSS (#5109)
Summary:
Changelog: UI Debugger is now available for Litho in Open Source

Pull Request resolved: https://github.com/facebook/flipper/pull/5109

Remove the stub, replace with the real thing.

Reviewed By: lblasa

Differential Revision: D46859213

fbshipit-source-id: 74c59a53d1d22e046254f4bca202da17a0b0e5d8
2023-09-08 04:02:48 -07:00
Pascal Hartig
42b95c21eb Disable Fresco integration for now (#5101)
Summary:
[android][sample] Disable Fresco integration for now
There's currently a startup crash

https://gist.github.com/passy/3f6b5935d8f9171ea0d3d915857b9786

We'll need to wait for a new Fresco release. In the meantime, let's comment this out so we can still use the rest of the app.

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/5101).
* __->__ https://github.com/facebook/flipper/issues/5101
* https://github.com/facebook/flipper/issues/5100

Pull Request resolved: https://github.com/facebook/flipper/pull/5101

Reviewed By: lblasa

Differential Revision: D48863903

Pulled By: passy

fbshipit-source-id: 0cb9c6050cf70a989b11ca60b3019ebab104279f
2023-09-01 09:43:21 -07:00
Lorenzo Blasa
ecc50f47e8 Clients to avoid sending payloads larger than the maximum allowed size
Summary: ^

Reviewed By: passy

Differential Revision: D48645400

fbshipit-source-id: ac262296f113298812803c12eccf5a37da1da2b7
2023-08-24 10:05:17 -07:00
generatedunixname89002005325672
c161e869d3 Daily arc lint --take KTFMT
Reviewed By: ivanmurashko

Differential Revision: D48553786

fbshipit-source-id: 269d46620ad34bd94a4df0d04ef3dfa5afbab613
2023-08-22 02:53:13 -07:00
Luke De Feo
4cc03ef4b2 Add litho framework events
Summary: Leverages the new connection listener inside the ui debugger to send framework events out of the Litho debug api and to the UIDebugger

Reviewed By: adityasharat

Differential Revision: D48350647

fbshipit-source-id: 2af48578b70bc50da43712f244f2bd208ad40988
2023-08-21 05:48:23 -07:00
David Vacca
76341a0215 Fix NoSuchMethodError when calling FbReactApplicationBaseSonarUtil.startSonarClient
Summary:
This diff is fixing a NoSuchMethodError when calling FbReactApplicationBaseSonarUtil.startSonarClient.

This is causing catalyst Android app to not start.

This was caused by D47468613, which changed the signature of the method

Reviewed By: cortinico

Differential Revision: D48275730

fbshipit-source-id: 4693c299dbd3b6a9ad58a1439bddd9e4bfb8bdf5
2023-08-14 09:54:54 -07:00
Pascal Hartig
29f072fc75 ACTUALLY disable dokka builds (#5005)
Summary:
This should hopefully unblock our Android builds for real this time. I didn't realise that the AGP itself seems to ship with a version of Dokka, so just removing the import didn't actually address the problem we were seeing.

Pull Request resolved: https://github.com/facebook/flipper/pull/5005

Test Plan:
```
./gradlew publishToMavenLocal -PRELEASE_SIGNING_ENABLED=false
```

This now succeeds.

Reviewed By: jknoxville

Differential Revision: D48312784

Pulled By: passy

fbshipit-source-id: f049e089a511726857f544386fe13dcb50fb2971
2023-08-14 06:34:51 -07:00
Luke De Feo
b30f7492cd Add connection listeners and framework events
Summary: Infra that will be used to capture litho framework events

Reviewed By: lblasa

Differential Revision: D47951601

fbshipit-source-id: 1dd756dc872d474f2872ff8cac1fd6aa3697e42b
2023-08-08 11:43:05 -07:00
Pascal Hartig
24cfd74252 Remove dokka plugin (#4995)
Summary:
[gradle] Remove dokka plugin
This is currently breaking our jetpack-compose build and blocks the entire release
as a consequence: https://github.com/facebook/flipper/issues/4970

There are all sorts of workarounds but they require changing the java target
which could have other downstream consequences: https://github.com/Kotlin/dokka/issues/2956

We don't actually rely on these artefacts at all, so it's probably safe to just disable this.

Closes https://github.com/facebook/flipper/issues/4970

Pull Request resolved: https://github.com/facebook/flipper/pull/4995

Test Plan: ./gradlew publishToMavenLocal

Reviewed By: antonk52

Differential Revision: D48062872

Pulled By: passy

fbshipit-source-id: aef0696d5ac83dd50bcbb96b0552f9b222f5a566
2023-08-07 11:18:54 -07:00
Luke De Feo
1de033c157 Add bounds to fragment
Summary: Previously the bounds was 0, the trick is to steel the offset from the view and then use offsetchild zero so it doesnt get applied twice

Reviewed By: lblasa

Differential Revision: D47915115

fbshipit-source-id: ff771470dcf1720ca265fc9017ff0ea3b0bc1ca1
2023-07-31 10:53:03 -07:00
Luke De Feo
6b74f66ab4 Add parent id to decor view
Summary: This whole nested observer approach can be simplified massively, but for now we are just threading the parent id through so its set for observer roots too

Reviewed By: lblasa

Differential Revision: D47915504

fbshipit-source-id: 924f722f38bb202b42ea9ef6da15e685f6c75e02
2023-07-31 10:53:03 -07:00
Luke De Feo
413f85964b Send invisible as hidden attribute
Summary: This allows UIDebugger to draw them differently in tree and visualiser

Reviewed By: lblasa

Differential Revision: D47915505

fbshipit-source-id: a4d2ef9d653233e3ff24bc26cfe8017f9b51dd2b
2023-07-31 10:53:03 -07:00
Luke De Feo
60016e69f5 Remove Node id default impl
Summary: This is never identity hash code for declarative framework so this default impl is just a source of bugs, including this one.

Reviewed By: lblasa

Differential Revision: D47754625

fbshipit-source-id: 470aab084c82fa847f25116342021a79d52b7c67
2023-07-26 04:58:43 -07:00
dependabot[bot]
4176415b55 Bump org.jetbrains.kotlin:kotlin-reflect from 1.8.22 to 1.9.0 (#4965)
Summary:
Bumps [org.jetbrains.kotlin:kotlin-reflect](https://github.com/JetBrains/kotlin) from 1.8.22 to 1.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/JetBrains/kotlin/releases">org.jetbrains.kotlin:kotlin-reflect's releases</a>.</em></p>
<blockquote>
<h2>Kotlin 1.9.0</h2>
<h2>Changelog</h2>
<h3>Analysis API</h3>
<h4>New Features</h4>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57930"><code>KT-57930</code></a> Analysis API: provide an API for extending Kotlin resolution</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57636"><code>KT-57636</code></a> K2: Add the return type of K2 reference shortener AA <code>ShortenCommand::invokeShortening()</code> e.g., <code>ShorteningResultInfo</code> to allow callers to access the shortening result PSI</li>
</ul>
<h4>Fixes</h4>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58249"><code>KT-58249</code></a> Analysis API: Disable error logging for FE10 implementation of resolveCall when resolve is not successful</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55626"><code>KT-55626</code></a> Impossible to restore symbol by psi from script file</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57314"><code>KT-57314</code></a> LL FIR: Combine <code>LLFirProvider$SymbolProvider</code>s in session dependencies (optimization)</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55527"><code>KT-55527</code></a> K2 IDE: Rewrite KtScopeContext class to allow to handle each scope separately</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55329"><code>KT-55329</code></a> LL FIR: Unexpected ACTUAL_WITHOUT_EXPECT error on constructor and function declaration</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-50732"><code>KT-50732</code></a> LL API: fix compiler based tests</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57850"><code>KT-57850</code></a> K2: contract violation due to SymbolLightAccessorMethod.propertyAccessorSymbol</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-56543"><code>KT-56543</code></a> LL FIR: rework lazy transformers so transformers modify only declarations they suppose to</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-56721"><code>KT-56721</code></a> K2: FirExtensionDeclarationsSymbolProvider: java.lang.IllegalStateException: Recursive update</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-50253"><code>KT-50253</code></a> Analysis API: Solve issues with ProcessCancelledException</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-56800"><code>KT-56800</code></a> K2 IDE: optimize deprecation calculation for symbols</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55006"><code>KT-55006</code></a> Analysis API does not transform Java type refs for callable symbol return types</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57256"><code>KT-57256</code></a> AA FIR: Reduce lazy resolve phase for deprecation status</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57619"><code>KT-57619</code></a> K2: CFG for class initializer is not correctly built in reversed resolve mode</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58141"><code>KT-58141</code></a> K2: AA FIR: impossible to restore symbol for declaration with annotation with argument inside type</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57462"><code>KT-57462</code></a> Symbol Light Classes: SymbolLightFieldForProperty should retrieve annotations not from KtPropertySymbol, but from the corresponding backing field</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-54864"><code>KT-54864</code></a> Analysis API: add function to get expect KtSymbol list by actual KtSymbol</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-56763"><code>KT-56763</code></a> Analysis API: <code>.KtSourceModuleImpl is missing in the map.</code> on symbol restore when symbol cannot be seen from the use-site module</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-56617"><code>KT-56617</code></a> Analysis API: optimize KtFirSymbolProviderByJavaPsi.getNamedClassSymbol</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-54430"><code>KT-54430</code></a> K2: .getAllOverriddenSymbols() returns invalid results</li>
</ul>
<h3>Backend. Native. Debug</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55440"><code>KT-55440</code></a> Kotlin/Native debugger: inline function parameters are not visible during debugging</li>
</ul>
<h3>Backend. Wasm</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58293"><code>KT-58293</code></a> Wasm: ReferenceError: e is not defined in kotlin.test.jsThrow</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58931"><code>KT-58931</code></a> Wasm tests are failing to start on Kotlin 1.9.0-Beta</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58188"><code>KT-58188</code></a> Restore binary compatibility of PlatformDiagnosticSuppressor.shouldReportUnusedParameter</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57136"><code>KT-57136</code></a> K/Wasm: Restrict non-external types in JS interop</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57060"><code>KT-57060</code></a> Clarify the lack of support for dynamic in Kotlin/Wasm</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-56955"><code>KT-56955</code></a> K/Wasm: Support restricted version of K/JS <code>js(code)</code></li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57276"><code>KT-57276</code></a> Wasm: &quot;Body not found for function&quot; error when compiling konform library with Kotlin/Wasm support</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-56976"><code>KT-56976</code></a> K/Wasm bug with calling override of external function with default parameters</li>
</ul>
<h3>Compiler</h3>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md">org.jetbrains.kotlin:kotlin-reflect's changelog</a>.</em></p>
<blockquote>
<h2>1.8.21</h2>
<h3>Compiler</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57848"><code>KT-57848</code></a> Native: compilation of dynamic/static library fails with Xcode 14.3</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57875"><code>KT-57875</code></a> Native compilation failure: Suspend functions should be lowered out at this point, but FUN LOCAL_FUNCTION_FOR_LAMBDA</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57946"><code>KT-57946</code></a> KAPT: &quot;RuntimeException: No type for expression&quot; with delegate</li>
</ul>
<h3>JavaScript</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57356"><code>KT-57356</code></a> KJS: StackOverflowException on <a href="https://github.com/JsExport"><code>@​JsExport</code></a> with type parameters referring to one another</li>
</ul>
<h3>Tools. Compiler plugins. Serialization</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58067"><code>KT-58067</code></a> Serialization: NullPointerException caused by <a href="https://github.com/Contextual"><code>@​Contextual</code></a> property with type with generic</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57730"><code>KT-57730</code></a> Serialization: &quot;IllegalStateException: Serializer for element of type <!-- raw HTML omitted -->.Foo has not been found&quot; caused by serialization of Java type</li>
</ul>
<h3>Tools. Gradle. JS</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-57766"><code>KT-57766</code></a> KJS / Gradle &quot;Module not found: Error: Can't resolve 'kotlin-kotlin-stdlib-js-ir'&quot; when using &quot;useEsModules&quot;</li>
</ul>
<h3>Tools. Kapt</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58027"><code>KT-58027</code></a> Kotlin 1.8.20 kapt issue &quot;null: KtCallExpression: build()&quot;</li>
</ul>
<h3>Tools. Maven</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58048"><code>KT-58048</code></a> Maven: &quot;Too many source module declarations found&quot; after upgrading to 1.8.20</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-58101"><code>KT-58101</code></a> 'Unable to access class' in kotlin-maven-plugin after updating to Kotlin 1.8.20</li>
</ul>
<h2>1.8.20</h2>
<h3>Analysis API</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55510"><code>KT-55510</code></a> K2: Lost designation for local classes</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55191"><code>KT-55191</code></a> AA: add an API to compare symbol pointers</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55487"><code>KT-55487</code></a> K2: symbol pointer restoring doesn't work for static members</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55336"><code>KT-55336</code></a> K2 IDE: &quot;java.lang.IllegalStateException: Required value was null.&quot; exception while importing a compiled JPS project</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55098"><code>KT-55098</code></a> AA: KtDeclarationRenderer should render a context receivers</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-51181"><code>KT-51181</code></a> LL API: errors for SAM with suspend function from another module</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-50250"><code>KT-50250</code></a> Analysis API: Implement Analysis API of KtExpression.isUsedAsExpression</li>
<li><a href="https://youtrack.jetbrains.com/issue/KT-54360"><code>KT-54360</code></a> KtPropertySymbol: support JvmField in javaSetterName and javaGetterName</li>
</ul>
<h3>Analysis API. FE1.0</h3>
<ul>
<li><a href="https://youtrack.jetbrains.com/issue/KT-55825"><code>KT-55825</code></a> AA FE1.0: stackoverflow when resolution to a function with a recursive type parameter</li>
</ul>
<h3>Analysis API. FIR</h3>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bcf27812cd"><code>bcf2781</code></a> Add ChangeLog for 1.9.0</li>
<li><a href="d372470550"><code>d372470</code></a> Don't get BuildScanExtension when buildScan report is disabled</li>
<li><a href="0ec76786a6"><code>0ec7678</code></a> [Gradle, JS] Return back deprecated methods for compatibility</li>
<li><a href="2427b51ba8"><code>2427b51</code></a> Relocate aalto-xml and stax2-api dependencies in embeddable compiler (KT-59631)</li>
<li><a href="56a7789f1d"><code>56a7789</code></a> Revert &quot;[Gradle] Fix invalidating iOS framework after import&quot;</li>
<li><a href="8cf1abc294"><code>8cf1abc</code></a> Add the possibility to omit explicitly specifying a version in annotationProc...</li>
<li><a href="4823fc3c64"><code>4823fc3</code></a> [Gradle] GranularMetadataTransformation: Collect moduleIds in ProjectData for...</li>
<li><a href="0d1932eab6"><code>0d1932e</code></a> [Gradle] Implement Future&lt;T&gt;.map(transform)</li>
<li><a href="bbf64b14d7"><code>bbf64b1</code></a> [Gradle] Implement KT59446TransformationOnTransitiveJavaDependencyTest</li>
<li><a href="54b11e3a95"><code>54b11e3</code></a> [Gradle] KotlinPluginLifecycle: Implement .toString for better diagnostics</li>
<li>Additional commits viewable in <a href="https://github.com/JetBrains/kotlin/compare/v1.8.22...v1.9.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-reflect&package-manager=gradle&previous-version=1.8.22&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/4965

Reviewed By: aigoncharov

Differential Revision: D47755886

Pulled By: passy

fbshipit-source-id: 6b253ac55c5177ef58702adb89ee4ebc2b4bea92
2023-07-25 09:10:38 -07:00
Pascal Hartig
6048f09fd0 Update copyright headers for jetpack-compose
Reviewed By: lawrencelomax

Differential Revision: D47664798

fbshipit-source-id: 1dfd69e7e821fb2640cfb2fd6f481942d59a8162
2023-07-24 04:40:53 -07:00
Lorenzo Blasa
07292f837d Clear event handler after error or close
Summary:
Previous approach was a bit flawed as the `isOpen()` API returns true by the time close is called.

This was OK in the case of errors, as the open flag was set to false hence preventing us to report a close after the error. It is not OK on healthy disconnect situations as these events were not getting reported.

In this case, a better solution is just to clear the event handler after a close or error because in either case we are no longer interested in dispatching any other events to the handler.

Reviewed By: antonk52

Differential Revision: D47510883

fbshipit-source-id: 883a3f87f24f71fe44a624590a310fe2563cbd8a
2023-07-17 06:54:35 -07:00
Luke De Feo
20d7b57dbe Fix KState extraction
Summary:
The field changed from mStates to states breaking our reflection based code. Ideally I would like to just check if type == KStateContainer and access the field normally but the rest of the infrastructure expect to work on a java field.

Added tests to catch this sort of thing in the future. had to shift buck files around a bit to get it to work

Reviewed By: antonk52

Differential Revision: D46974357

fbshipit-source-id: 87a6f5883b33e4d1a7359df5987fc7ead7c19033
2023-07-03 12:19:26 -07:00