Skip to content

Matter: Update next to __pairs, rawget to __index#2865

Merged
hcarter-775 merged 2 commits into
mainfrom
update/deep-equals
Apr 1, 2026
Merged

Matter: Update next to __pairs, rawget to __index#2865
hcarter-775 merged 2 commits into
mainfrom
update/deep-equals

Conversation

@hcarter-775

@hcarter-775 hcarter-775 commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Description of Change

In order to support the way that the driver's st_store held data pre-58, we must use the __pairs() and __index() metamethods that are overwritten. Else, the data within the global st_store, when compared, will always compare as equal

Summary of Completed Tests

Unit tests that were failing when run using 0.58 Lua libs now pass with this change. Unit tests run on the latest continue to pass.

@github-actions

github-actions Bot commented Mar 31, 2026

Copy link
Copy Markdown

Channel deleted.

@github-actions

github-actions Bot commented Mar 31, 2026

Copy link
Copy Markdown

Test Results

   72 files    494 suites   0s ⏱️
2 703 tests 2 703 ✅ 0 💤 0 ❌
4 571 runs  4 571 ✅ 0 💤 0 ❌

Results for commit 09c78b1.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Mar 31, 2026

Copy link
Copy Markdown

File Coverage
All files 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/new-matter-lock/init.lua 77%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/new-matter-lock/can_handle.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/lock_utils.lua 68%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 09c78b1

@hcarter-775 hcarter-775 force-pushed the update/deep-equals branch 2 times, most recently from db4c9ee to 0361979 Compare April 1, 2026 15:36
@hcarter-775 hcarter-775 changed the title Matter Lock: Update next to __pairs, rawget to __index Matter: Update next to __pairs, rawget to __index Apr 1, 2026
@ctowns

ctowns commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Is matter lock the only driver affected by this? The deep_equals function is used in matter-switch and matter-sensor as well, and just want to confirm that it doesn't need to be changed there also.

@hcarter-775

Copy link
Copy Markdown
Contributor Author

@ctowns Thank you catching that! not sure what happened, I had updated all 4 drivers. I re-worked that.

@hcarter-775 hcarter-775 merged commit e9d9394 into main Apr 1, 2026
11 checks passed
@hcarter-775 hcarter-775 deleted the update/deep-equals branch April 1, 2026 16:32
@hcarter-775 hcarter-775 changed the title Matter: Update next to __pairs, rawget to __index Matter Lock: Update next to __pairs, rawget to __index Apr 1, 2026
@hcarter-775

hcarter-775 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor Author

Something strange has happened- I had tried to make my life easier by merging a commit into this branch from a different branch, but it's made some weird behavior.

There are 2 commits in this PR taht were merged to main, here and here. However, the PR now makes it seem like only 1 file was changed.

@hcarter-775 hcarter-775 changed the title Matter Lock: Update next to __pairs, rawget to __index Matter: Update next to __pairs, rawget to __index Apr 1, 2026
@ctowns

ctowns commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Yeah there is something weird going on here, these changes now all have conflicts with the beta branch as well. IDK what happened but I will resolve the conflicts on the beta merge PR

@gharveymn

Copy link
Copy Markdown
Contributor

I think you may have done your extra work in the main branch and then locally merged that into this branch ("Merge branch 'main' into update/deep-equals"). So that's why that other commit doesn't show up here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants