'NSInternalInconsistencyException' crash happening when query is changing for CollectionViewDataSource

Step 2: Describe your environment

Objective C or Swift: Swift
iOS version: 10.2
Firebase SDK version: 3.12.0
FirebaseUI version: 1.0.0
CocoaPods Version: 1.2.0

Step 3: Describe the problem:
For a little more background, I have received help from Morgan Chen regarding my problem on StackOverflow: here
On my collection view, I have a segmented control that allows users to toggle queries from online to offline users, and vice versa.
Even after clearing out the data source as recommended, the app crashes because of NSInternalInconsistencyExceptions.
I've been clearing out my data source like this:
collectionView.dataSource = nil
collectionViewDataSource = nil

I am still getting crashes.
Steps to reproduce:

Create query for users that are online.
Remove old data source and then create new query for users that are offline.
Repeat until crash.

Observed Results:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of items in section 0.  The number of items contained in an existing section after the update (1) must be equal to the number of items contained in that section before the update (1), plus or minus the number of items inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).'
*** First throw call stack:
(0x1838511b8 0x18228855c 0x18385108c 0x18430902c 0x18a00014c 0x1898d5d4c 0x1002680a8 0x100268ddc 0x100243ef4 0x102435258 0x102435218 0x10243a280 0x1837fe810 0x1837fc3fc 0x18372a2b8 0x1851de198 0x1897717fc 0x18976c534 0x10010a65c 0x18270d5b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

Expected Results:

I would like for the app to toggle online and offline users as much as they'd like without an app crash.

Relevant Code:
extension BrowseVC {
func getUserData() {
  let isOnline = (segmentedControl.selectedSegmentIndex == 0) ? true : false
  generateQuery(isOnline: isOnline)
  populateDataSource()
}

func resetQuery() {
  removeOldData()
  getUserData()
}

func removeOldData() {
  collectionView.dataSource = nil
  collectionViewDataSource = nil
}

func generateQuery(isOnline: Bool) {
  if let selectedShowMe = UserDefaults.sharedInstance.string(forKey: Constants.ProfileKeys.ShowMe) {
    let forMen = (selectedShowMe == Constants.ProfileValues.Men) ? true : false
    query = FirebaseDB.sharedInstance.buildQuery(forMen: forMen, isOnline: isOnline)
  } else {
    query = FirebaseDB.sharedInstance.buildQuery(forMen: false, isOnline: isOnline)
  }
}

func populateDataSource() {
  if let query = query {
    collectionViewDataSource = FUICollectionViewDataSource(query: query, view: collectionView, populateCell: { (view, indexPath, snapshot) -> ProfileCVCell in
      if let cell = view.dequeueReusableCell(withReuseIdentifier: Constants.CollectionViewCellIdentifiers.ProfileCVCell, for: indexPath) as? ProfileCVCell {
        if let userDictionary = snapshot.value as? [String: AnyObject] {
          if let user = User(uid: snapshot.key, userDictionary: userDictionary) {
            cell.populate(withUser: user)
          }
        }

        return cell
      }
      return ProfileCVCell()
    })

    collectionView.dataSource = collectionViewDataSource
  }
}
}

Initially getUserData() is being called when the VC is first created, but for every query change, resetQuery() is being called which removes the old data source and runs getUserData() again.

This affects also us, please merge and release 2.0.2 as soon as possible, thank you!

This has been fixed in v2.0.2. Now, when you don't want a data source to send updates to its view component anymore, just set it to nil.
dataSource.tableView = nil

Thanks for the quick fix! Now it is working correctly.

Hey @morganchen12 ,
Thanks for the quick update, but I've been messing around with the code and I'm still getting crashes.
To give you an update,
I'm clearing out the old data like this
collectionViewDataSource?.collectionView = nil collectionView.dataSource = nil collectionViewDataSource = nil
And I'm getting this crash:
When I reset the data source, then wait a second before starting the next query
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of items in section 0.  The number of items contained in an existing section after the update (1) must be equal to the number of items contained in that section before the update (1), plus or minus the number of items inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).' *** First throw call stack: (0x1845a91b8 0x182fe055c 0x1845a908c 0x18506102c 0x18ad5814c 0x18a62dd4c 0x100252d5c 0x100254300 0x100253a10 0x10022eafc 0x102429258 0x102429218 0x10242e280 0x184556810 0x1845543fc 0x1844822b8 0x185f36198 0x18a4c97fc 0x18a4c4534 0x1000f408c 0x1834655b8) libc++abi.dylib: terminating with uncaught exception of type NSException
or
When I reset the data source, then immediately start the next query
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'request for index path for global index<PHONE_NUMBER>854775807 when there are only 0 items in the collection view' *** First throw call stack: (0x1845a91b8 0x182fe055c 0x1845a908c 0x18506102c 0x18a6307f0 0x18a6347b0 0x18a632cc8 0x18ad5b200 0x18a46c7dc 0x18ad5a230 0x18ad582d0 0x18a62dd4c 0x1001c2d7c 0x1001c4320 0x1001c3a30 0x10019eb1c 0x102395258 0x102395218 0x10239a280 0x184556810 0x1845543fc 0x1844822b8 0x185f36198 0x18a4c97fc 0x18a4c4534 0x100064540 0x1834655b8) libc++abi.dylib: terminating with uncaught exception of type NSException
Stack trace is here:
`

thread #1: tid = 0xe55a, 0x0000000183577014 libsystem_kernel.dylib__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT   frame #0: 0x0000000183577014 libsystem_kernel.dylib__pthread_kill + 8
frame #1: 0x000000018363f450 libsystem_pthread.dylibpthread_kill + 112   frame #2: 0x00000001834eb400 libsystem_c.dylibabort + 140
frame #3: 0x0000000182fb52d4 libc++abi.dylibabort_message + 132   frame #4: 0x0000000182fd2cc0 libc++abi.dylibdefault_terminate_handler() + 304
frame #5: 0x0000000182fe0844 libobjc.A.dylib_objc_terminate() + 124   frame #6: 0x0000000182fcf66c libc++abi.dylibstd::__terminate(void (*)()) + 16
frame #7: 0x0000000182fcef84 libc++abi.dylib__cxa_throw + 136   frame #8: 0x0000000182fe0690 libobjc.A.dylibobjc_exception_throw + 364
frame #9: 0x00000001845a908c CoreFoundation+[NSException raise:format:arguments:] + 104   frame #10: 0x000000018506102c Foundation-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112
frame #11: 0x000000018a6307f0 UIKit-[UICollectionViewData indexPathForItemAtGlobalIndex:] + 300   frame #12: 0x000000018a6347b0 UIKit-[UICollectionViewData layoutAttributesForGlobalItemIndex:] + 28
frame #13: 0x000000018a632cc8 UIKit-[UICollectionView _viewAnimationsForCurrentUpdate] + 6188   frame #14: 0x000000018ad5b200 UIKit__71-[UICollectionView _updateWithItems:tentativelyForReordering:animator:]_block_invoke.1993 + 132
frame #15: 0x000000018a46c7dc UIKit+[UIView(Animation) performWithoutAnimation:] + 104   frame #16: 0x000000018ad5a230 UIKit-[UICollectionView _updateWithItems:tentativelyForReordering:animator:] + 3224
frame #17: 0x000000018ad582d0 UIKit-[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:] + 13816   frame #18: 0x000000018a62dd4c UIKit-[UICollectionView _updateRowsAtIndexPaths:updateAction:] + 364

frame #19: 0x00000001001c2d7c CPQK-[FUICollectionViewDataSource array:didAddObject:atIndex:](self=<unavailable>, _cmd=<unavailable>, array=<unavailable>, object=<unavailable>, index=<unavailable>) + 168 at FUICollectionViewDataSource.m:54 [opt] frame #20: 0x00000001001c4320 CPQK-[FUIArray insertSnapshot:withPreviousChildKey:](self=0x0000000170443e10, _cmd=, snap=, previous=) + 264 at FUIArray.m:183 [opt]
frame #21: 0x00000001001c3a30 CPQK__24-[FUIArray observeQuery]_block_invoke((null)=0x0000000170443c60, snapshot=<unavailable>, previousChildKey=<unavailable>) + 100 at FUIArray.m:84 [opt] frame #22: 0x000000010019eb1c CPQK__43-[FChildEventRegistration fireEvent:queue:]_block_invoke.68((null)=) + 96 at FChildEventRegistration.m:61 [opt]
frame #23: 0x0000000102395258 libdispatch.dylib_dispatch_call_block_and_release + 24 frame #24: 0x0000000102395218 libdispatch.dylib_dispatch_client_callout + 16
frame #25: 0x000000010239a280 libdispatch.dylib_dispatch_main_queue_callback_4CF + 1200 frame #26: 0x0000000184556810 CoreFoundationCFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
frame #27: 0x00000001845543fc CoreFoundation__CFRunLoopRun + 1660 frame #28: 0x00000001844822b8 CoreFoundationCFRunLoopRunSpecific + 444
frame #29: 0x0000000185f36198 GraphicsServicesGSEventRunModal + 180 frame #30: 0x000000018a4c97fc UIKit-[UIApplication _run] + 684
frame #31: 0x000000018a4c4534 UIKitUIApplicationMain + 208 frame #32: 0x0000000100064540 CPQKmain + 140 at AppDelegate.swift:15
frame #33: 0x00000001834655b8 libdyld.dylib`start + 4

thread #3: tid = 0xe5c3, 0x0000000183577a88 libsystem_kernel.dylib__workq_kernreturn + 8   frame #0: 0x0000000183577a88 libsystem_kernel.dylib__workq_kernreturn + 8
frame #1: 0x000000018363b344 libsystem_pthread.dylib_pthread_wqthread + 1452   frame #2: 0x000000018363ad8c libsystem_pthread.dylibstart_wqthread + 4
thread #7: tid = 0xe5cb, 0x0000000183577314 libsystem_kernel.dylib__semwait_signal + 8, name = 'gputools.smt_poll.0x1700343e0'   frame #0: 0x0000000183577314 libsystem_kernel.dylib__semwait_signal + 8
frame #1: 0x000000018349525c libsystem_c.dylibnanosleep + 212   frame #2: 0x000000018349517c libsystem_c.dylibusleep + 64
frame #3: 0x000000010240de14 GPUToolsCoresmt_poll_thread_entry(void*) + 136   frame #4: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240
frame #5: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284   frame #6: 0x000000018363ad94 libsystem_pthread.dylibthread_start + 4
thread #8: tid = 0xe5d6, 0x0000000183577314 libsystem_kernel.dylib__semwait_signal + 8, name = 'gputools.smt_poll.0x170034b80'   frame #0: 0x0000000183577314 libsystem_kernel.dylib__semwait_signal + 8
frame #1: 0x000000018349525c libsystem_c.dylibnanosleep + 212   frame #2: 0x000000018349517c libsystem_c.dylibusleep + 64
frame #3: 0x000000010240de14 GPUToolsCoresmt_poll_thread_entry(void*) + 136   frame #4: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240
frame #5: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284   frame #6: 0x000000018363ad94 libsystem_pthread.dylibthread_start + 4
thread #9: tid = 0xe5dd, 0x0000000183559188 libsystem_kernel.dylibmach_msg_trap + 8, name = 'com.apple.uikit.eventfetch-thread'   frame #0: 0x0000000183559188 libsystem_kernel.dylibmach_msg_trap + 8
frame #1: 0x0000000183558ff8 libsystem_kernel.dylibmach_msg + 72   frame #2: 0x00000001845565d0 CoreFoundation__CFRunLoopServiceMachPort + 192
frame #3: 0x00000001845541ec CoreFoundation__CFRunLoopRun + 1132   frame #4: 0x00000001844822b8 CoreFoundationCFRunLoopRunSpecific + 444
frame #5: 0x0000000184fbf26c Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304   frame #6: 0x0000000184fdfdd0 Foundation-[NSRunLoop(NSRunLoop) runUntilDate:] + 96
frame #7: 0x000000018ae3dc38 UIKit-[UIEventFetcher threadMain] + 136   frame #8: 0x00000001850bce68 FoundationNSThread__start + 1024
frame #9: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240   frame #10: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284
frame #11: 0x000000018363ad94 libsystem_pthread.dylib`thread_start + 4
thread #11: tid = 0xe5e5, 0x0000000183577a88 libsystem_kernel.dylib__workq_kernreturn + 8   frame #0: 0x0000000183577a88 libsystem_kernel.dylib__workq_kernreturn + 8
frame #1: 0x000000018363b344 libsystem_pthread.dylib_pthread_wqthread + 1452   frame #2: 0x000000018363ad8c libsystem_pthread.dylibstart_wqthread + 4
thread #13: tid = 0xe5e7, 0x000000018363ad88 libsystem_pthread.dylibstart_wqthread   frame #0: 0x000000018363ad88 libsystem_pthread.dylibstart_wqthread
thread #14: tid = 0xe5e8, 0x0000000183559188 libsystem_kernel.dylibmach_msg_trap + 8, name = 'com.apple.NSURLConnectionLoader'   frame #0: 0x0000000183559188 libsystem_kernel.dylibmach_msg_trap + 8
frame #1: 0x0000000183558ff8 libsystem_kernel.dylibmach_msg + 72   frame #2: 0x00000001845565d0 CoreFoundation__CFRunLoopServiceMachPort + 192
frame #3: 0x00000001845541ec CoreFoundation__CFRunLoopRun + 1132   frame #4: 0x00000001844822b8 CoreFoundationCFRunLoopRunSpecific + 444
frame #5: 0x0000000184c87a70 CFNetwork+[NSURLConnection(Loader) _resourceLoadLoop:] + 336   frame #6: 0x00000001850bce68 FoundationNSThread__start + 1024
frame #7: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240   frame #8: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284
frame #9: 0x000000018363ad94 libsystem_pthread.dylib`thread_start + 4
thread #15: tid = 0xe5ed, 0x0000000183576e1c libsystem_kernel.dylib__psynch_cvwait + 8   frame #0: 0x0000000183576e1c libsystem_kernel.dylib__psynch_cvwait + 8
frame #1: 0x000000018363c9c0 libsystem_pthread.dylib_pthread_cond_wait + 640   frame #2: 0x0000000182f653ec libc++.1.dylibstd::__1::condition_variable::wait(std::__1::unique_lockstd::__1::mutex&) + 56
frame #3: 0x0000000188d865d0 JavaScriptCorevoid std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 112   frame #4: 0x0000000188d86544 JavaScriptCorebmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>::threadRunLoop() + 168
frame #5: 0x0000000188d86424 JavaScriptCorebmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadEntryPoint(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*) + 12   frame #6: 0x0000000188d866d4 JavaScriptCorevoid std::__1::__thread_proxy<std::__1::tuple<void ()(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>> >(void) + 92
frame #7: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240   frame #8: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284
frame #9: 0x000000018363ad94 libsystem_pthread.dylib`thread_start + 4
thread #16: tid = 0xe5ee, 0x0000000183559188 libsystem_kernel.dylibmach_msg_trap + 8, name = 'com.squareup.SocketRocket.NetworkThread'   frame #0: 0x0000000183559188 libsystem_kernel.dylibmach_msg_trap + 8
frame #1: 0x0000000183558ff8 libsystem_kernel.dylibmach_msg + 72   frame #2: 0x00000001845565d0 CoreFoundation__CFRunLoopServiceMachPort + 192
frame #3: 0x00000001845541ec CoreFoundation__CFRunLoopRun + 1132   frame #4: 0x00000001844822b8 CoreFoundationCFRunLoopRunSpecific + 444
frame #5: 0x0000000184fbf26c Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304   frame #6: 0x000000010019dbe8 CPQK-[_FSRRunLoopThread main](self=, _cmd=) + 252 at FSRWebSocket.m:1840 [opt]
frame #7: 0x00000001850bce68 Foundation__NSThread__start__ + 1024   frame #8: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240
frame #9: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284   frame #10: 0x000000018363ad94 libsystem_pthread.dylibthread_start + 4
thread #17: tid = 0xe604, 0x000000018357723c libsystem_kernel.dylib__select + 8, name = 'com.apple.CFSocket.private'   frame #0: 0x000000018357723c libsystem_kernel.dylib__select + 8
frame #1: 0x000000018455d468 CoreFoundation__CFSocketManager + 640   frame #2: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240
frame #3: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284   frame #4: 0x000000018363ad94 libsystem_pthread.dylibthread_start + 4
thread #18: tid = 0xe608, 0x0000000183576e1c libsystem_kernel.dylib__psynch_cvwait + 8, name = 'JIT Worklist Worker Thread'   frame #0: 0x0000000183576e1c libsystem_kernel.dylib__psynch_cvwait + 8
frame #1: 0x000000018363c9c0 libsystem_pthread.dylib_pthread_cond_wait + 640   frame #2: 0x0000000182f653ec libc++.1.dylibstd::__1::condition_variable::wait(std::__1::unique_lockstd::__1::mutex&) + 56
frame #3: 0x0000000188d6ed64 JavaScriptCoreWTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l,<PHONE_NUMBER>l> > >) + 2132   frame #4: 0x0000000188b46a5c JavaScriptCoreJSC::JITWorklist::runThread() + 192
frame #5: 0x0000000188b46eac JavaScriptCorestd::__1::__function::__func<JSC::JITWorklist::JITWorklist()::$_0, std::__1::allocator<JSC::JITWorklist::JITWorklist()::$_0>, void ()>::operator()() + 16   frame #6: 0x00000001884b700c JavaScriptCoreWTF::threadEntryPoint(void*) + 212
frame #7: 0x00000001884b6f1c JavaScriptCoreWTF::wtfThreadEntryPoint(void*) + 24   frame #8: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240
frame #9: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284   frame #10: 0x000000018363ad94 libsystem_pthread.dylibthread_start + 4
thread #19: tid = 0xe609, 0x0000000183576e1c libsystem_kernel.dylib__psynch_cvwait + 8, name = 'WTF Parallel Helper Thread'   frame #0: 0x0000000183576e1c libsystem_kernel.dylib__psynch_cvwait + 8
frame #1: 0x000000018363c9c0 libsystem_pthread.dylib_pthread_cond_wait + 640   frame #2: 0x0000000182f653ec libc++.1.dylibstd::__1::condition_variable::wait(std::__1::unique_lockstd::__1::mutex&) + 56
frame #3: 0x0000000188d6ed64 JavaScriptCoreWTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l,<PHONE_NUMBER>l> > >) + 2132   frame #4: 0x0000000188d6e2e8 JavaScriptCoreWTF::ParallelHelperPool::waitForClientWithTask(WTF::LockerWTF::LockBase const&) + 288
frame #5: 0x0000000188d6e088 JavaScriptCoreWTF::ParallelHelperPool::helperThreadBody() + 76   frame #6: 0x00000001884b700c JavaScriptCoreWTF::threadEntryPoint(void*) + 212
frame #7: 0x00000001884b6f1c JavaScriptCoreWTF::wtfThreadEntryPoint(void*) + 24   frame #8: 0x000000018363d850 libsystem_pthread.dylib_pthread_body + 240
frame #9: 0x000000018363d760 libsystem_pthread.dylib_pthread_start + 284   frame #10: 0x000000018363ad94 libsystem_pthread.dylibthread_start + 4
`

This looks like an app-specific timing/shared state issue. Can you post more of your code?

@morganchen12 I've created a gist with the two files that are involved in the crash.
gist
The BrowseVC is where users toggle between online and offline users through queries, and the FirebaseDB file is where the queries are generated with singleton.

Hm, you may need to call reloadData() when you swap out the data source for a new one. That way the collection view isn't confused, for example, if you change from a data source that has 12 elements to one that has 7--the data source sends child added events to populate the initial data, but the collection view it looks like children were removed.
If your collection views are massively different, I'd suggest keeping two separate views in a tab bar controller (or other similar controller), as this may help avoid stale state bugs.
Let me know if you still run into crashes.

Thank you for your input, @morganchen12. I was thinking that the reloading of data was still free, but I guess it's not after I null the data source's associated view.
I'll work on the code some and report back. If it continues acting funky, I'll also take your suggestion on keeping two views. That was something I had in mind, but thought the memory and data would've been wasteful. Better than crashes by all measures though!

Hi,
I actually couldn't get it to work correctly, the problem is just more hidden.
Isn't there always a chance for an error because if we take a look at this pattern:
self.dataSource = FUITableViewDataSource(collection: sortedArray, view: table) { tableView, indexPath, snapshot in
    let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! MyCell
    ...
    return cell
}
table.dataSource = self.dataSource
table.reloadData()

We can see that the sortedArray will start observing in the constructor of the FUITableViewDataSource (actually deep in FUIDataSource, initWithCollection) and then it will race with the table.reloadData() call to do various UITableView insert etc. operations?
So what we actually would need to do, is to delay the [_collection observeQuery]; call after the table.reloadData() call. Then the table would be first emptied of old cells using the (at the time) empty datasource, and then it would resume normal operations and "push" the rows using the FUI* family of methods.
What do you think @morganchen12
Using FUIArraythis works 99% of the time, but when I switch to FUISortedArray, it always fails with

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (48) must be equal to the number of rows contained in that section before the update (0), plus or minus the number of rows inserted or deleted from that section (24 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'

where the numbers work out so that the "after update" count is always double the number inserted.

Yeah, imo this is an issue in the design of our data source class. We should be separating initialization from the pushing of events, since it's surprising (and bad) that initializing an object should have side effects.
I'm thinking something like
/** initializes the data source, doesn't do anything */
 public init(collection: FUICollection)

/** attaches the data source to the view and starts sending updates */
public func bind(toView: UICollectionView) -> Void

/** unbinds the data source from the view */
public func unbind() -> Void

Unfortunately, this would be a breaking API change.

It sounds exactly right to remove the side effects. Do you have any estimate when this could be merged and released? We actually have an app waiting to go to approval, but this is the last major issue that prevents us from going forward.

There's nothing blocking a new release, but I'd like to aggregate any breaking API changes we'd want now so I don't end up bumping the major version every 2 weeks.
Any suggestions?

Not really, the only thing we'd like to see added is https://github.com/firebase/FirebaseUI-iOS/issues/230, but I don't think this release should wait any new features as the issue may be affecting multitude of apps resulting in hard to trace (seemingly) random bugs.
So I vote for quick releases now and in future too.

I appreciate Firebase and the developers who are in charge of it. The bug I have created a ticket for, would be great to have the Firebase team help me and the community by solving it.
But, @swftvsn, you do know that you're pretty much demanding iOS Firebase to be updated to solve a problem that you are dealing with on an app that no one yet uses, to break the code bases on the entire iOS Firebase community, right? Are you even a paying Firebase customer? 🤣
The bugs we're dealing with, not all that many developers are dealing with them, so I think your reasoning for quick releases are bull$hit.

@datureezy I too am thankfull for the great product and associated code that we can use to speed up the development of our apps.
I'm not demanding anything, sorry if the text came out too harsh, just gave my wish how to proceed, of course from my point of view.
I'm strong proponent for quick and numerous releases. It's way better than the old once a year thing that some companies seem to do. After all devs can and should limit / nail down the version in their pod / what not file and update when they want to. We're in control of that. But we can't update if the fixes are not released. We're not in control of that.
And it's not like this is the main firebase release, but the ios accompanying components that we're talking about.
And yes, we're happy to pay the price they ask for the service.
Back to this issue though - @morganchen12 could we get some kind of time frame / educated guess for this release? Are we talking about weeks or months? If it's going to take long then I probably should fork your branch and build it from there?

No worries, this release has been cut.
https://github.com/firebase/FirebaseUI-iOS/releases/tag/v3.0.0

Awesome! Thank you!

Hey @morganchen12,
Thanks for the 3.0.0 release. I have implemented in the bind and unbind functions and they've gotten me to an acceptable state with the functionality I'm looking for. My app still crashes when the query changes fast (really fast), but really, I can't imagine my users frantically toggling back and forth like maniacs with any useful purpose. To block their ability to do any craziness, I've just disabled my segmented control which resets queries for 750 milliseconds after firing, and I haven't been able to crash once. Thank you for your help, BIG TIME!

Hi,
The way our app is designed we need to change the data source during infinite left / right swipe scenario (Changing the month user is observing), so we can't disable the user controls. (Which is extremely bad anyway from UX standpoint.) Also disabling for a moment is bad because the time frame when the error will manifest itself will grow when you have more data or slower devices.
I hope this helps someone in the future, I ended up doing this, and don't get the crashes anymore (so far..., fingers crossed)
//Unbind the old datasource from the tableview if there is already one
self.dataSource?.unbind()

//Set empty datasource to the tableview
self.tableView.dataSource = EmptyDataSource()

//Instruct tableview to reload.
//This causes it to remove any rows there might be lingering around.
self.tableView.reloadData()

// Assign new datasource to self.dataSource here. Do not start to observe yet.

//This will replace the empty datasource we just set and
//start observing and updating the empty tableView
self.dataSource?.bind(to: self.tableView)

//Ready. Do not reload tableView past this point, datasource will push changes to it!

One future improvement point would probably be for the data source to clean after itself to reset the table to empty state, but that's not very important as we can do it ourselves.

@swftvsn, are you populating your cells in the closure after you initialize your dataSource? I'm running my code just like yours, step by step (but just for collection views), and my app still crashes with:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'request for index path for global index<PHONE_NUMBER>854775807 when there are only 0 items in the collection view'
With your queries being even more varied than mine (offline & online), I'm not sure how yours is not crashing, and mine crashes just after 5-6 new queried calls.

Hmm, that's really odd, or then some codepath in UICollectionDataViewSource wasn't updated vs. the tableview one.
That said, I do as little as possible in the closure (I only extract some ints and strings from the FIRDataSnapshot and set those to my own data transfer object and set it to the cell), and nothing that would change the UI.
The real work is done in
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)

method that sets the label texts and images, starts the animations etc.

Thanks for your input, @swftvsn. Perhaps me pulling out 3-4 values per row in that closure is causing the slow-up followed by a crash. I'll try extracting only a lookup key and do some willDisplay type method for collectionView cells and report back. 👍

Extremely good thread, thanks!

I also getting the "NSInternalInconsistencyException", but I have 2 Views, each has a tableview and gets populated via self.dataSource = self.tableView.bind(to: getQuery()) { tableView, indexPath, snap in ....
Does this also apply for me? I can't figure out how to fix this Exception.

@warhost can you file a new issue with full stack trace and other info?

@warhost can you file a new issue with full stack trace and other info?

@morganchen12 Solved. Updated my code to the lates sample practices, does the Job.

@datureezy Did you ever solve your problem? I am facing the exact error, after changing data sources 4-5 times I will get the internal inconsistency crash. Before binding to a new ref I do the steps listed above (unbind, clear data source, etc).

@adornoventura Same thing here.

@warhost It seems like no matter what I do it will always crash after loading a new data source 4-5 times.

@adornoventura Could you post the code to what you are describing?
I have the exact same problem I think

@warhost I have one CollectionView that has to switch between 4 different data sets based on two segmented controls (one "outside" control and one "inside" control). I have one method that swaps the data source and I pass it the string representation of the child node from where the data should be loaded. The method is called from various places, most notably the segmentValueChanged callback from one of the segment controls. In the if collectionViewDataSource != nil block I've tried a different combinations of things, none of which solves the problem.
`func loadBooksWith(stringRef: String) {
if collectionViewDataSource != nil {
self.collectionViewDataSource.collectionView = nil
self.collectionViewDataSource.unbind()
self.collectionView.reloadData()
}
if let user = Auth.auth().currentUser {
            let ref = Database.database().reference().child("users").child(user.uid).child(stringRef)

            self.collectionViewDataSource = self.collectionView?.bind(to: ref) { collectionView, indexPath, outerSnap in
                let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "User_Book_Cell", for: indexPath) as! UserBookCollectionViewCell`

@adornoventura Okay this looks sort of similar. I am trying to follow the database example of the firebase quickstart repo, but also face these Exception issues.


Fix broken tests

Several tests are broken on Travis.

Six of the tests are still failing with
Failure/Error: super(token || ENV.fetch('GITHUB_ACCESS_TOKEN'))

KeyError:
  key not found: "GITHUB_ACCESS_TOKEN"
# ./lib/lock_diff/github/access_token.rb:5:in `fetch'

The GITHUB_ACCESS_TOKEN environment variable doesn't seem to have been set on Travis. Could you take a look at this? @vividmuimui

Thanks!

It looks like Travis isn't setting the GITHUB_ACCESS_TOKEN environment variable. @vividmuimui will probably have to look into this since he is the only one with access to the Travis environment variables.

I set up the environment variables in travis. And now the test passes on travis CI with PR #45.


Only last filter in FilteredQuery used

Tire is using an array within the "filter" value of filtered queries. The Filtered Query elasticsearch documentation uses a hash, so this is not a documented feature of elasticsearch.  I found that only the last filter in the filter array will be used by elasticsearch for this incorrect syntax.
Running the following example shows the problem.
#!/usr/bin/env ruby

require 'tire'

Tire.index 'bug_test' do
  delete
  create
  store :title => 'One',   :tags => ['ruby'],           :published => false
  store :title => 'Two',   :tags => ['ruby', 'python'], :published => true
  store :title => 'Three', :tags => ['java'],           :published => true
  store :title => 'Four',  :tags => ['ruby', 'php'],    :published => false
  refresh
end

Tire.configure { logger STDOUT, :level => 'debug' }

s = Tire.search 'bug_test' do
  query do
    filtered do
      query { all }
      filter :term, :published => true
      filter :term, :tags => 'ruby'
    end
  end
end

s = Tire.search 'bug_test' do
  query do
    filtered do
      query { all }
      filter :term, :published => true
      filter :term, :tags => 'ruby'

      # Hack to wrap the filters array in an :and filter
      to_hash[:filter] = { :and => to_hash[:filter] }
    end
  end
end

Two searches are made, and logged to STDOUT.
The first search (body shown below) returns 3 documents, including the ones with published => false, which should be filtered.
{
    "query": {
        "filtered": {
            "query": {
                "match_all": {}
            },
            "filter": [{
                "term": {
                    "published": true
                }
            }, {
                "term": {
                    "tags": "ruby"
                }
            }]
        }
    }
}

The second search (body shown below) wraps the filter array within an :and filter, so both filters apply and one results is returned.
{
    "query": {
        "filtered": {
            "query": {
                "match_all": {}
            },
            "filter": {
                "and": [{
                    "term": {
                        "published": true
                    }
                }, {
                    "term": {
                        "tags": "ruby"
                    }
                }]
            }
        }
    }
}

Hi, yeah, seems like a problem with filtered query implementation. Notice than when using regular filters, they are all chained with and, by default:
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'tire'

Tire.index 'multiple_filters_as_and_filters' do
  delete
  create
  store :title => 'One',   :tags => ['ruby'],           :published => false
  store :title => 'Two',   :tags => ['ruby', 'python'], :published => true
  store :title => 'Three', :tags => ['java'],           :published => true
  store :title => 'Four',  :tags => ['ruby', 'php'],    :published => false
  refresh
end

Tire.configure { logger STDOUT, :level => 'debug' }

s = Tire.search 'multiple_filters_as_and_filters' do
  query { all }
  filter :term, :published => true
  filter :term, :tags => 'ruby'
end

p s.results

I didn't write the FilteredQuery implementation -- @ralph, could you please take a look what's going on in there? [937db3f]

Will have a look! Just found this in @test/integration/filtered_queries_test.rb@, so I guess I misunderstood how elasticsearch uses filtered queries.
        s = Tire.search('articles-test') do
          query do
            filtered do
              query { all }
              filter :and, { :terms => { :tags => ['ruby', 'python'] } },
                           { :range => { :words => { :from => '250', :to => '250' } } }
            end
          end
        end


Introduce .kraftignore

This issue tracks ignoring files during either the build process (where files are recognised) or packaging process (where a filesystem is created), a .kraftignore file should exclude any glob-patterns from being used.

HI! @nderjung is there anyone working on this issue, If not then I'd like to work on it :)

Hi that's no problem. I just wanted to check in, you were also working on the configurable output format, would you like to swap project?

Yes! I'd like to work on this project until configurable output format project's decision has been made for the liberary  https://github.com/kubernetes/cli-runtime/tree/master/pkg.

@nderjung shoul I start working on it :)

Hi @MdSahil-oss, this work is dependent on proper volume support within the context of both compiling files (and passing files to the relevant build system); building filesystems (e.g. CPIO); as well as, runtime file system mapping (e.g. 9pfs).
Please hold off on this project until an issue describing proper volume support in KraftKit is put together as it this will implicitly provide greater detail as to how .kraftignore will eventually work and how it will be implemented.  I'll have time early next week to put a document together to describe the action items necessary. (:

@nderjung Now, is there possiblity? to implement this feature in Kraftkit ?


CCSDt with UHF results in ValueError

Here's the error for MWE for N2 with UHF and atomic fragmentation, full bath and DMET active space. (inp attached below)
          |      ebcc:
          |       > Version:  1.4.0
          |       > Git hash: ff52401
          |      OMP_NUM_THREADS = 24
          |
          |      UCCSDt
          |      ******
          |      Options:
          |       > e_tol:  1e-08
          |       > t_tol:  1e-08
          |       > max_iter:  200
          |       > diis_space:  12
          |      Ansatz: CCSDt
          |      Space: ((7o, 53v) [(5o, 3v) active], (7o, 53v) [(5o, 3v) active])
          |      Iter   Energy (corr.)        Δ(Energy)    Δ(Amplitudes)
          |         0    -0.8248985092
          |      Time for CCSDt solver: 3.3 s
Traceback (most recent call last):
  File "/users/k2262473/Calculations/testing/CCSDt/Solver_CCSDt/input.py", line 26, in <module>
    emb.kernel()
  File "/users/k2262473/dev/Vayesta/vayesta/ewf/ewf.py", line 169, in kernel
    x.kernel()
  File "/users/k2262473/dev/Vayesta/vayesta/ewf/fragment.py", line 236, in kernel
    cluster_solver.kernel()
  File "/users/k2262473/dev/Vayesta/vayesta/solver/ebcc.py", line 33, in kernel
    mycc.kernel()
  File "/users/k2262473/dev/ebcc/ebcc/rebcc.py", line 380, in kernel
    amplitudes = self.update_amps(amplitudes=amplitudes, eris=eris)
  File "/users/k2262473/dev/ebcc/ebcc/uebcc.py", line 238, in update_amps
    res = func(**kwargs)
  File "/users/k2262473/dev/ebcc/ebcc/codegen/UCCSDt.py", line 120, in update_amps
    t3new_aaaaaa += einsum(v.aabb.OVov, (0, 1, 2, 3), t3.abaaba[np.ix_(soa,sob,sOfa,sva,svb,sVfa)], (4, 2, 5, 6, 3, 7), (4, 5, 0, 6, 7, 1)) * 2.0
ValueError: operands could not be broadcast together with shapes (7,7,5,53,53,3) (7,5,5,53,3,3) (7,7,5,53,53,3)

input.py.txt
output.txt
The same with RHF runs without an error and produces correct results.

If I use density fitting I get the following error in EBCC
Traceback (most recent call last):   File "/users/k2262473/Calculations/testing/ebcc_CCSDt/input.py", line 15, in <module>     eb = EBCC(mf, ansatz='CCSDt')   File "/users/k2262473/dev/ebcc/ebcc/__init__.py", line 145, in EBCC     return UEBCC(mf, *args, **kwargs)   File "/users/k2262473/dev/ebcc/ebcc/rebcc.py", line 279, in __init__     self._eqns = self.ansatz._get_eqns(self.spin_type)   File "/users/k2262473/dev/ebcc/ebcc/ansatz.py", line 139, in _get_eqns     eqns = importlib.import_module("ebcc.codegen.%s" % name)   File "/scratch/grp/morty/k2262473/miniconda/envs/pygnme/lib/python3.10/importlib/__init__.py", line 126, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load   File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'ebcc.codegen.UDFCCSDt'
here's a better MWE without Vayesta:
`import pyscf
import pyscf.gto
import pyscf.scf
import ebcc
from ebcc import EBCC
mol=pyscf.gto.Mole()
mol.atom = ["N 0 0 0", "N 0 0 2"]
mol.basis = "CCpvtz"
mol.output = "pyscf.out"
mol.build()
Hartree-Fock
mf = pyscf.scf.UHF(mol)
#mf = mf.density_fit()
mf.kernel()
eb = EBCC(mf, ansatz='CCSDt')
eb.kernel()`
the error:
`        _
| |
___ | |__    ___   ___
/ _ | '_ \  / | / |
|  /| |_) || ( | (
_||_./  _| ___|
1.4.0
numpy:

Version:  1.25.2
Git hash: N/A
pyscf:
Version:  2.4.0
Git hash: b27e4f9fb
ebcc:
Version:  1.4.0
Git hash: ff52401
OMP_NUM_THREADS =

UCCSDt

Options:

e_tol:  1e-08
t_tol:  1e-08
max_iter:  200
diis_space:  12
Ansatz: CCSDt
Space: ((7o, 53v), (7o, 53v))
Solving for excitation amplitudes.
Iter   Energy (corr.)        Δ(Energy)    Δ(Amplitudes)
0    -0.9081471029
Traceback (most recent call last):
File "/users/k2262473/Calculations/testing/ebcc_CCSDt/input.py", line 16, in
eb.kernel()
File "/users/k2262473/dev/ebcc/ebcc/rebcc.py", line 380, in kernel
amplitudes = self.update_amps(amplitudes=amplitudes, eris=eris)
File "/users/k2262473/dev/ebcc/ebcc/uebcc.py", line 238, in update_amps
res = func(**kwargs)
File "/users/k2262473/dev/ebcc/ebcc/codegen/UCCSDt.py", line 122, in update_amps
t3new_aaaaaa += einsum(v.aabb.OVov, (0, 1, 2, 3), t3.abaaba[np.ix_(soa,sob,sOfa,sva,svb,sVfa)], (4, 2, 5, 6, 3, 7), (4, 5, 0, 6, 7, 1)) * 2.0
ValueError: operands could not be broadcast together with shapes (7,7,0,53,53,0) (7,0,0,53,0,0) (7,7,0,53,53,0)
`

Sorry I haven't got round to this yet -- the DF issue is intended behaviour. If there is a with_df option, ebcc will try to use a DF-optimised ansatz. If you want to use a DF mean-field with the non-DF-optimised ansatzes, then either make a new mean-field with the MOs, or do something like
mf._eri = np.dot(with_df._cderi.T, with_df._cderi)
del mf.with_df

Sorry I haven't got round to this yet -- the DF issue is intended behaviour. If there is a with_df option, ebcc will try to use a DF-optimised ansatz. If you want to use a DF mean-field with the non-DF-optimised ansatzes, then either make a new mean-field with the MOs, or do something like
mf._eri = np.dot(with_df._cderi.T, with_df._cderi)
del mf.with_df

Thanks!
I did the following and it worked.
with_df = mf.with_df
_eri = dot(with_df._cderi.T,with_df._cderi)

newmf = pyscf.scf.UHF(mol)
newmf.mo_coeff = mf.mo_coeff
newmf.mo_occ = mf.mo_occ
newmf._eri = _eri

cc_  = EBCC(newmf, ... )

Just to confirm, occ, coeff, and eri suffice.. right?

you'll probably need e_tot for energies - i don't think mo_energy is actually needed but not sure. I'd just be complete and assigned mo_energy, mo_coeff, mo_occ, e_tot, converged.
the easiest way is probably just
from pyscf import lib

with lib.temporary_env(mf, with_df=None, _eri=np.dot(with_df._cderi.T, with_df._cderi):
    cc = EBCC(mf)
    cc.kernel()

@abhishekkhedkar09 can you see if everything is working on 16998b4fd4da8471318f58a6352231ff038f18f0?

@abhishekkhedkar09 can you see if everything is working on 16998b4?

I still get the following error
UCCSDt
******
Options:
 > e_tol:  1e-08
 > t_tol:  1e-08
 > max_iter:  200
 > diis_space:  12
Ansatz: CCSDt
Space: ((5o, 14v) [(1o, 1v) active], (5o, 14v) [(1o, 1v) active])
Solving for excitation amplitudes.
Iter   Energy (corr.)        Δ(Energy)    Δ(Amplitudes)
   0    -0.2113674627
Traceback (most recent call last):
  File "/users/k2262473/Calculations/testing/ebcc_CCSDt/ebcc-examples-folder/input.py", line 30, in <module>
    ccsdt.kernel()
  File "/users/k2262473/dev/ebcc/ebcc/rebcc.py", line 380, in kernel
    amplitudes = self.update_amps(amplitudes=amplitudes, eris=eris)
  File "/users/k2262473/dev/ebcc/ebcc/uebcc.py", line 238, in update_amps
    res = func(**kwargs)
  File "/users/k2262473/dev/ebcc/ebcc/codegen/UCCSDt.py", line 118, in update_amps
    t3new_aaaaaa[np.ix_(soa,soa,sOa,sva,sva,sVa)] += einsum(f.aa.OO, (0, 1), t3.aaaaaa[np.ix_(soa,soa,sOfa,sva,sva,sVfa)], (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) * -6.0
IndexError: index 4 is out of bounds for axis 2 with size 1

here's my input based on the RCCSDt example in ebcc, perhaps to check for correctness as well.
import numpy as np
from pyscf import gto, scf

from ebcc import UEBCC, Space

mol = gto.Mole()
mol.atom = "H 0 0 0; F 0 0 1.1"
mol.basis = "cc-pvdz"
mol.build()
mf = scf.UHF(mol)
mf.kernel()

occupied = mf.mo_occ > 0
active = np.zeros_like(occupied)

active[0][np.sum(mol.nelectron) // 2 - 1] = True  # HOMO
active[1][np.sum(mol.nelectron) // 2 - 1] = True  # HOMO
active[0][np.sum(mol.nelectron) // 2] = True      # LUMO
active[1][np.sum(mol.nelectron) // 2] = True      # LUMO

space = tuple(Space(o > 0, np.zeros_like(a), a) for o, a in zip(mf.mo_occ, active))

# Run a CCSDt calculation
ccsdt = UEBCC(mf, ansatz="CCSDt", space=space)
ccsdt.kernel()

it's running on cec2afd420d879b1203ac6c67ad8d5fc3c24202f - can you check correctness and the vayesta interface?

it's running on cec2afd - can you check correctness and the vayesta interface?

@abhishekkhedkar09 did you see this?

cool no rush -- just checking. I'll make a PR.

Fixed in #39


Getting an error 'Error: Unable to process file command 'output' successfully.' when running oasdiff/oasdiff-action/diff@main from main.

Hi,
When we are running the diff check from the main branch we are getting the errors below:
10running oasdiff diff base: specs/original-spec.yaml, revision: specs/modified-spec.yaml, format: text, fail_on_diff: true, include_path_params: false, exclude_elements: , composed: false, output_to_file: 11flags:  --format text --fail-on-diff 12Error: Unable to process file command 'output' successfully. 13Error: Invalid value. Matching delimiter not found 'a48a4f97a1a9457eb4dd8bb5332a6f3c'
To fix it we set the version v.0.0.16 and it worked:
<EMAIL_ADDRESS>from oasdiff/oasdiff-action/diff@main
Let me know if additional details are needed.
Thanks,

@lioramazor, thank you for your assistance!
Could you please help by writing a test that reproduces the issue?

@effoeffi of course.
We are running oasdiff in our gated PR using Github action.
The steps:

Change some values in the openapi.yaml/json file in a side branch and create a pull request to the main branch.
The pull request is running the test from oasdiff/oasdiff-action/diff@main using the following command:
      - name: Running OpenAPI Spec diff action        id: test_ete        uses: oasdiff/oasdiff-action/diff@main        with:          base: 'specs/original-spec.yaml' //main          revision: 'specs/modified-spec.yaml' //branch        fail-on-diff: true
And then it failed with the error Error: Unable to process file command 'output' successfully.

Let me know if additional information is needed.
Thanks,

@lioramazor take a look in our tests in here
Can you add a similar test that reproduces the issue?

@effoeffi sharing the test:
`
name: API Breaking Changes
on:
pull_request:
jobs:
build-oas-artefacts:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: '12.x'
  - name: Install required tools
    run: |
      npm install speccy -g
      npm install -g<EMAIL_ADDRESS>    env:
      CURRENT_BRANCH: ${{ github.head_ref }}
      TARGET_BRANCH: ${{ github.base_ref }}

  - name: Clone repository in branch ${{ env.TARGET_BRANCH }}
    uses: actions/checkout@v2
    with:
      path: 'A'
      ref: ${{ github.base_ref }}

  - name: Clone repository in branch ${{ env.CURRENT_BRANCH }}
    uses: actions/checkout@v2
    with:
      path: 'B'

  - name: Check if OAS from ${{ env.CURRENT_BRANCH }} is valid
    run: |
      npx openapi-generator validate -i B/openapi/openapi.yaml

  - name: Check if OAS from ${{ env.TARGET_BRANCH }} is valid
    run: |
      npx openapi-generator validate -i A/openapi/openapi.yaml

  - name: Build OAS specifications
    run: |
      npx speccy resolve A/openapi/openapi.yaml -o original-spec.yaml
      npx speccy resolve B/openapi/openapi.yaml -o modified-spec.yaml

  - name: Upload single OAS file from ${{ env.TARGET_BRANCH }}
    uses: actions/upload-artifact@v1
    with:
      name: original-spec.yaml
      path: original-spec.yaml

  - name: Upload single OAS file from ${{ env.CURRENT_BRANCH }}
    uses: actions/upload-artifact@v1
    with:
      name: modified-spec.yaml
      path: modified-spec.yaml

build-report:
needs: build-oas-artefacts
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: '13.x'
  - name: Download OAS file from SOURCE branch
    uses: actions/download-artifact@v1
    with:
      name: original-spec.yaml
      path: specs/

  - name: Download OAS file from TARGET branch
    uses: actions/download-artifact@v1
    with:
      name: modified-spec.yaml
      path: specs/

  - name: Restore permissions
    run: |
      chmod -R 600 $(pwd)/specs/original-spec.yaml
      chmod -R 600 $(pwd)/specs/modified-spec.yaml

  - name: Print original-spec
    run: cat $(pwd)/specs/original-spec.yaml

  - name: Print modified-spec
    run: echo $(pwd) && cat $(pwd)/specs/modified-spec.yaml

  - name: Running OpenAPI Spec diff action
    id: test_ete
    uses<EMAIL_ADDRESS>    with:
      base: 'specs/original-spec.yaml'
      revision: 'specs/modified-spec.yaml'
      fail-on-diff: true

`

@lioramazor, what I need is to reproduce the issue. Unfortunately, I cannot do so with the example you sent. It's evident that our tests do not reproduce the issue. Could you open a PR with a test, or share a repository that reproduces it?

@effoeffi We found the issue, we set the format value to 'text':
      - name: Running OpenAPI Spec diff action             id: test_ete             uses: oasdiff/oasdiff-action/diff@main             with:               base: 'specs/original-spec.yaml'               revision: 'specs/modified-spec.yaml'               **format: 'text'**               fail-on-diff: true
It worked when we ran it without  format: 'text'.


Not woks on my pc

Hello,
i have this problem :
server not starting : http://prntscr.com/aq9dol
Client = OK
Server = Not start ..
Thanks, !

Game server is in development stage

Hello how can put our server ips on i2.txt ?

In the next update I gave up an encrypted type the IP address in the near future will open json

do you have facebook or something like that to getting online messaging

@eralpcicekdagi, only VKontakte
https://vk.com/mzer0ne


Updates to reflect service worker registration being opt-in.

R: @gaearon @Timer etc.
Fixes #3864
There are some changes to the docs needed if/when navigateFallback is re-enabled in the service worker configuration, but those are tracked in https://github.com/facebook/create-react-app/pull/3870 and I'm guessing that @piotr-cz will tackle them?

@jeffposnick Thanks, I've closed #3870

I've moved @piotr-cz's changes from #3870 (reinstating navigateFallback) into this PR.
I've also added a config option to disable skipWaiting, as it leads to better compatibility with lazy-loading at the expense of potentially extended the lifetime of previously cached data (until you close the final window/tab that had an old version of your web app open). Since a developer who explicitly opts-in to service worker support is less likely to be confused about showing cached data, it seemed like a good compromise.

Hey guys - any update on this PR?

Hey everyone, any estimate when this will be merged?


Table of Contents via AsciiDoc + editor section moved

This would be a way to get some more navigability out of the README ... at the cost of not using more-people-are-familiar-with GitHub-flavored Markdown and instead using AsciiDoc (a cheatsheet).
See rendered here: https://github.com/toastal/purescript-tidy/tree/editor-support-asciidoc
Raw: https://raw.githubusercontent.com/toastal/purescript-tidy/editor-support-asciidoc/README.adoc
Do feel free to straight-up close if that's not the direction you are headed. It didn't take much time but I figured it'd be an interesting comparison :shrug:

I know that most people probably don't know this even exists, but GH supports TOCs in all READMEs, it's just not front and center.

I have zero experience with AsciiDoc, and I'm not sure any of the other maintainers do either.

I would rather stay with Markdown simply because I don't know AsciiDoc, but I don't feel super strongly about it.

I had never seen that button :sweat_smile:. GitLab renders AsciiDoc but doesn't add this feature. I guess GitHub's trying to make the best out of a bad situation. Markdown is easy 'cause it's simple but not well-standardized nor feature-rich. But we are where we are. I'll close!

TBF, it's a fairly new feature, I think.


Bump importlib-metadata from 4.10.0 to 4.11.1 (#3824)

Pull request opened by the merge tool on behalf of #3824

Merged in 9ed3305510821ab64c34581668163552dbaff56b


ModuleNotFoundError: No module named 'flit_core.dummy'

I'm building my project with
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

and since earlier today I'm getting the error message
      [...]
      ModuleNotFoundError: No module named 'flit_core.dummy'
      [end of output]

when running pip install . on the repo. Perhaps I messed up something in the package, but the error message points towards flit. Any idea what's going on?

This is hitting my projects as well which use pre-commit to install flakeheaven.  A debug log is attached
pre-commit.log

This is almost certainly related to #499. Based on the logs here and in #529, I'd guess this occurs when a) it can't get __version__ by static analysis, so it falls back to running code, and b) __init__.py contains a relative import.
It looks like this is going to hit a load of people - sorry about that. I'll ask people now: please don't comment just to say it affects you too (you can click the :+1: under the first comment).
I am pretty busy, so any help working out how to deal with this is welcome. Besides #499, you might want to look at commit 432dc76245d6564a150cb2e485db12f6c2a1836e where the 'dummy' module names were introduced, and the backwards-compatibility implementation of load_module in importlib which we were using before the changes in #499.

I'd guess this occurs when a) it can't get version by static analysis,

Indeed! I set the version to static in pyproject.toml and pip install . shows some import errors that I can work with. I guess flit bumped into those when trying to resolve dynamic=["version"], and just didn't manage to forward the error message.

Yup, I have the version number in __about__.py, and it's imported from there in __init__.py and other places. That's how I ran into the issue.

I am getting it from csselect2 due to relative imports in init here

Again, I know this issue is going to affect a lot of people. There will hopefully be a fix soon. In the meantime, please :+1: the initial comment if you just want to say 'me too'. Thanks!

Based on a tiny test case, I think #531 fixes this. It would be great if some people affected by it on real projects could try it out and see if there are other issues lurking. Install from that branch, and then try either flit build or pip install . --no-build-isolation.

FYI, the docs seem to be out of date. The "3.7.1" milestone confused me for a second, because the "current" version in the docs is 3.5.1.

It would be great if some people affected by it on real projects could try it out and see if there are other issues lurking.

It seems to work well for me. Thanks a lot for the quick fix.

It looks like the docs stopped building when we renamed master to main (https://github.com/readthedocs/readthedocs.org/issues/7907). I've just updated the RTD config, hopefully it will be happy now.

@nschloe could I ask you to give a bit more detail of what your code is like, what you're doing and what you see (more of the traceback)? If you're using pip, pass --no-build-isolation just to test this, otherwise it will set up a temporary build environment and install flit_core 3.7.0 from PyPI.

You can also just set the URL in the pyproject.toml's requires section, like:
requires = ["flit @ git+https://github.com/pypa/flit@i530"]

I just run any flit command, e.g., flit publish, on nschloe/colorio to get the error. I can provide more details tomorrow.

The correct syntax (thanks @layday) is:
requires = ["flit-core @ git+https://github.com/pypa/flit@i530#subdirectory=flit_core"]

I tried this out:
$ brew install git-lfs
$ gh repo clone nschloe/colorio
$ cd colorio

Removing the cap on flit version causes pip install . to fail. Changing to the line above fixes it!
🚢

Thanks @henryiii for looking up the correct syntax! With this, it also works for me.

Same issue here. I'd be happy to test the fix if there is a clear step by step explanation of how to try that.

@createcandle https://github.com/pypa/flit/issues/530#issuecomment-1048341568

@nschloe Thanks, but for me that's missing a few steps ':-)

OK, it seems like #531 fixes this. I'll merge that and make a new release (3.7.1).

& thanks for testing it!


Added Top Left, Top Right, Bottom Left and Bottom Right

Classes Added

.bg-g-t-[name]
.bg-g-t-r-[name]
.bg-g-t-l-[name]
.bg-g-r-[name]
.bg-g-b-[name]
.bg-g-b-r-[name]
.bg-g-b-l-[name]
.bg-g-l-[name]
.bg-gradient-to-top-right-[name]
.bg-gradient-to-top-left-[name]
.bg-gradient-to-bottom-right-[name]
.bg-gradient-to-bottom-left-[name]

Hey, thanks for the PR! I agree that the class names are a little long, but I don't think having two versions of each class is the right way to go. Not everyone uses Purgecss with Tailwind so the less unused classes the better. In fact, I think the directions (to top, to top left, etc.) should be customizable for the same reason, with all of them (including the diagonal ones you added) included by default. Perhaps not customizable per color but at least globally.
I'm down with shorter class names, but I would like to keep the word "gradient" unabbreviated, so I suggest going with bg-gradient-[direction]-[color] where the directions are customizable but they would be t, tr, r, br, b, bl, l, and tl by default (like Tailwind's rounded-tr, etc.). I still think including the word to made it less ambiguous (is it starting from the top or ending at the top?), but it's easy enough to look at the result in a browser and change the direction if it's the reverse of what was expected. What do you think?

@benface I have updated with the new naming conventions :)

Hey thank you @KaniRobinson, but I've added a directions option like I mentioned above and used short direction names by default (t instead of to-top, r instead of to-right, etc.). I tagged a new release with that change, let me know what you think. Closing this PR now, thanks again!


Fix Dataverse endpoints

Not all Dataverse instances provide open API to work with data repository and some instances require authentication and authorization to use it's API. It's not detected right now and we need to identify if Dataverse API is available and if it's not it shouldn't be registry data catalog entry. Also if authentication is required and we could detect it, probably we need to update data catalog entry schema to set authentication required flag

All endpoints tested and updated for all instances using 'scripts/apidetect.py'


XP tracker "sometimes" does not track xp unless "reset all" is clicked

For some reason, the xp tracker does not always track xp for me. I would have to click the "reset all" button before it does. I haven't been able to find a pattern in when it does or does not start tracking xp straight away.

Fixed in #1367


parse returns default time of 0900 with dates like 'next friday' despite passed struct_time

I’m passing a date like: next wednesday
parse returns the proper date, but a time of 9:00 am
passing a struct_time with a time set to 00:01 returns the same 9:00 am time
For other date formats, however, the passed struct_time has the intended effect.
Here is my testing.
Here is the behavior without the struct_time
p.parse('next wednesday')
(time.struct_time(tm_year=2015, tm_mon=2, tm_mday=18, tm_hour=9, tm_min=0, tm_sec=0, tm_wday=2, tm_yday=49, tm_isdst=-1), 1)
Now I’ll add the time.struct_time
t_s = time.struct_time(time.localtime()[:3] + (0,0,0,0,0,-1))
t_s
time.struct_time(tm_year=2015, tm_mon=2, tm_mday=12, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1)
But, the parsed date still returns as 9am
p.parse('next wednesday',t_s)
(time.struct_time(tm_year=2015, tm_mon=2, tm_mday=21, tm_hour=9, tm_min=0, tm_sec=0, tm_wday=5, tm_yday=52, tm_isdst=-1), 1)
Other date formats will work
p.parse('July 1, 2005',t_s)
((2005, 7, 1, 0, 0, 0, 0, 0, -1), 1)
p.parse('July 1',t_s)
((2015, 7, 1, 0, 0, 0, 0, 0, -1), 1)
But when I want to get the effect with a more vague date, the passed struct_time doesn’t seem to have the effect.
p.parse('today',t_s)
(time.struct_time(tm_year=2015, tm_mon=2, tm_mday=12, tm_hour=9, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=43, tm_isdst=-1), 1)
p.parse('today+ 5 days',t_s)
(time.struct_time(tm_year=2015, tm_mon=2, tm_mday=17, tm_hour=9, tm_min=0, tm_sec=0, tm_wday=1, tm_yday=48, tm_isdst=-1), 1)
So it appears that passing the struct_time works for all but the dates in the form
next wed
tomorrow
etc.

I added a new flag to the Constant() class
cal.ptc.StartTimeFromSourceTime
which defaults to False (for the current behaviour) and when set to True will cause any of the parsing code that used to have 9am hardcoded to now use the hour, minute and second from the given source time.

Thanks.  It works as you say, and as I needed.

On Feb 15, 2015, at 11:01 AM, Mike Taylor<EMAIL_ADDRESS>wrote:
I added a new flag to the Constant() class
cal.ptc.StartTimeFromSourceTime
which defaults to False (for the current behaviour) and when set to True will cause any of the parsing code that used to have 9am hardcoded to now use the hour, minute and second from the given source time.
—
Reply to this email directly or view it on GitHub https://github.com/bear/parsedatetime/issues/81#issuecomment-74431198.

glad I could fix it for you


Display rotation issue...

Please paste the output of the following command here: Sudo edit-chroot -all

name: buster
encrypted: no
Entering /mnt/stateful_partition/crouton/chroots/buster...
crouton: version 1-20200428114634~master:67dc8d77
release: buster
architecture: arm64
xmethod: xorg
targets: xfce,xorg
host: version 13020.67.0 (Official Build) stable-channel kukui
kernel: Linux localhost 4.19.113-08544-ge67503bc40df #1 SMP PREEMPT Tue Jun 2 00:44:47 PDT 2020 aarch64 GNU/Linux
freon: yes
Unmounting /mnt/stateful_partition/crouton/chroots/buster...
Please describe your issue:
I have been messing around with crouton and so far I like it on my Chromebook duet!
But I do have a problem. Every time I try to change the display rotation in Xfce (I have tried other desktop environments but they all don't really work.) The mouse and keyboard start acting weird with delays. And severe UI glitches. The USB mouse/keyboards seem to work fine. The keyboard problem is only visible on the dot connector keyboard. But there are still severe UI lags which aren't in portrait mode. It would take a second before my mouse movement gets displayed on the screen. By default, the crouton rotation is in portrait mode and I want to put it in landscape mode but it doesn't like that. I needed to change the rotation by the xrandr command because the GUI would just crash my Chromebook. Any suggestions?
(I also have tried different versions like focal fossa and xenial but all  have the same problems.)
If known, describe the steps to reproduce the issue:
On a Lenovo Chromebook duet:
Install crouton: sudo crouton -r buster -t xfce
Launch it: Sudo startxfce4
Launch terminal and type: xrandr -o left

I can confirm this I also tried on the default release. It happens also if you change the rotation from xfce or gnome display settings.
Sometimes it also restarts.

This problem is problem with default software in Linux. I have the same problem on normal Linux tablet and I resolve this problem about ten days ago, when I do it again I will post how I do to resolve this issue.


adjust to the Podfile generate_multiple_pod_projects=true mode

last PR have triggered github bug and hanging for many hours, as described by this link: https://github.com/orgs/community/discussions/78775
so I recreat this pr for fix issue #130
and the last closed pr is there: #131 which contain some other bugs I reported in it's conversation, we can fix together

/integration-test

LGTM. Thank you for the contribution 👍


Feat/ttls

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: thomasten:x: Leonard CohnenLeonard Cohnen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


React integration example

Is your feature request related to a problem? Please describe.
I'm currently trying to integrate this example to a react/typescript project,
Describe the solution you'd like
A simple example of square integrated on a react website.
Describe alternatives you've considered
Most of all examples/documentation referring to react + square refer to depreciated tools.
Additional context
I try to integrate this current repo to a react/typescript project, I got rid of all errors, but the input and button for card payment do not work yet. I'll play with it a bit more.

Hi @marc-aurele-besner
There is a React Wrapper here https://github.com/weareseeed/react-square-web-payments-sdk that Square recommends for developers looking for a React Wrapper of the Web Payments SDK. Hope that helps

Hi @premachb
Thank you very much for your help :)


Sort Calendar Events

Is your feature request related to a problem? Please describe.
Calendar events are in no discernable order and pull old events
Describe the solution you'd like
Would like to have a way to sort events by date or alphabetical order. Would also like past events filtered out.

OK, good idea. I'll try to get to it next week, after fixing a couple of issues.
It is not clear if you like to see old events or not. Currently they are not visible. By "filtered out", you mean, don't want to see them, right? If you do want to see them, that would be a problem, because it will clutter the UI with many events, and we only have room for a few on the screen. Also, would be confusing to the user, since they cannot set a reminder on the watch in the past.

Hi, thanks for the quick response!  No, I don't want to see old events.  You're right, it does look like, with a couple odd exceptions, that old events are filtered out.  The old dates I was seeing are the start dates of repeating events.
While you're working on it, here's a few other suggestions to look into when you have time:

In the app, can we list the calendar name in the event listing?
It would also be nice to be able to select which calendars are included in the list, but I know that's probably more work than you would have time to do right now.
It would also be great if we could add the time of the event at the beginning of the reminder name (maybe optionally?). So a dinner at 5pm would be something like "5pm Dinner" or something.  I know there's a really small character length allowed, so maybe that's not practical.
Also, someone else mentioned this as well, and maybe I'll try to figure out how to do this at some point, but I'd love a way to have alarms coincide with reminders.  I understand the complications that relate to that with defaulting to daily alarms, having to cancel those each day, etc.
Maybe we could have a right-button-action that automatically syncs the next 5 calendar events with the reminders and alarms??  That would be amazing!

Frankly, I am not sure there is significant added value in implementing all these. This is a simple app, and can only handle a few events, all visible on one screen at the same time. Also, this is only a secondary feature of this app. The order of the events comes from the Google calendar, so maybe I can manipulate that, but I don't see a lot of values in allowing the user to select sorting further. In any case, these are good suggestions, but I have a lot of other issues to work on.
Having said that, I will go over these carefully, and may implement some of them.

Hi @izivkov Yes, totally realize that those suggestions are probably overkill for this app.  Just some thoughts and any that you have time to implement would be great, but I completely understand that you've got other things going on.  Appreciate your hard work on this!

No problem. I'm away at the moment, will be back by the end of the week,
and will take a look at this issue.  As you said, it is probably not
necessary to implement all these features, because on the all all you have
to do is select the events you like to send to the watch. But I'll take a
look and respond to this next week
On Mon., Jul. 31, 2023, 10:45 a.m. Andy, @.***> wrote:

Hi @izivkov https://github.com/izivkov Yes, totally realize that those
suggestions are probably overkill for this app. Just some thoughts and any
that you have time to implement would be great, but I completely understand
that you've got other things going on. Appreciate your hard work on this!
—
Reply to this email directly, view it on GitHub
https://github.com/izivkov/CasioGShockSmartSync/issues/44#issuecomment-1658518801,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA7M37UBYJPMJJ3TGWY7TJDXS7AJ5ANCNFSM6AAAAAA2NYISIQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hey @ahayes79 . I looked into ways to sort the events. Currently, the events are sorted by the time of creation. It is possible to sort the events on the start date. This has some merit, but if you have repeating events, they will be sorted on the day of the first event, not on the next coming up event. So, for example of you set a repeating event last year, and the event has not expired, it will be displayed first. I would like to sort by next occurrence instead. All in all, since we have small number of events, and they are all visible on the screen, it does not make a lot of difference.
I may add sorting in the next release, but I don't want to complicate the UI by making it user-selectable. Let's just keep this as simple as possible.
I will close the issue for now. Thanks for your input, and do not hesitate to suggest ideas, or even contribute to the project.

@ahayes79, I will add sorting by start date in the next release. Thanks for your suggestion.


Add page title to browser history tracking

Is it possible to somehow have the page title of the section you are on in the history tracking instead of just the default page title? It would make navigating a bit better I think?

When we drop Tocify, I'll be sure to add this!

@lord any closer to dropping tocify?

Somewhat — we have some code in the v2 branch, but it's behind master. Still working on it!

This is now a feature (until we cut a new version, just in the dev branch). The page title is the text of the current top-level header of this section.


Add 'Contributing' section to the readme

This will help potential contributers understand the contribution workflow.

Done


Initialization

Does this plugin require that GridScrollExtension ext1 = new GridScrollExtension(grid); would be used only inside init method or it could also be used inside enter method of a View class? Because the mentioned enter does not work.

GridScrollExtension ext1 = new GridScrollExtension(grid); can be also elsewhere, not just init.

And that's it? Nothing more is required?

Yes. Depending what you use it for, you can also use following API given by the extension.
public void restoreScrollPosition()
public int getLastXPosition()
public int getLastYPosition()
public void setScrollPosition(int Xposition, int Yposition)


Only limit if requested is not cached

I am trying to implement a rate limiting with additional cache. This works as far as it goes, but I want to limit the rate only if the entry cannot be loaded from the cache. What is the best way to implement this?
self.session = CachedLimiterSession(
            limiter=Limiter(RequestRate(2, Duration.SECOND * 5)),  # max 2 requests per 5 seconds
            bucket_class=SQLiteBucket,
            backend=SQLiteCache(ROOT_DIR + "/cache/cache.sqlite"),
        )

Good news: if you're using the example from the readme, then it will already behave as you've described.
This is due to cooperative multiple inheritance. requests_cache.CacheMixin is the first class in the list, so when there is a cache hit, it does not need to make a real request (which would call requests_ratelimiter.LimiterMixin and then requests.Session).

Thanks for the feedback. I used the sample code from the readme but unfortunately, despite caching, only 2 requests are made per 5 seconds.
class CachedLimiterSession(CacheMixin, LimiterMixin, Session):
    """Session class with caching and rate-limiting behavior. Accepts arguments for both
    LimiterSession and CachedSession.
    """

class Api:
    def __init__(self):
        self.session = CachedLimiterSession(
            limiter=Limiter(RequestRate(2, Duration.SECOND * 5)),  # max 2 requests per 5 seconds
            bucket_class=SQLiteBucket,
            backend=SQLiteCache(ROOT_DIR + "/cache/cache.sqlite"),
        )

        self.action_session = CachedLimiterSession(
            limiter=Limiter(RequestRate(2, Duration.SECOND * 5)),  # max 2 requests per 5 seconds
            bucket_class=SQLiteBucket,
            backend=SQLiteCache(ROOT_DIR + "/cache/action.sqlite"),
            expire_after=604800  # 7 days
        )
...


Hear no evil, speak no evil.

For some reason I forgot that a mute icon shows for status in private chats too. Fixed it so hopefully any other status icons (such as no video) are also affected in the future.

I told you earlier to accept this but I am closing it because there's something else I needed to fix.

Oh, bother.


Enable Round-Robin Scheduling

OS_CFG_SCHED_ROUND_ROBIN_EN must be enabled, since we want to have tasks at the same priority level. More configuration might be necessary to get this to work.

Determined unnecessary for the time being since we explicitly define scheduling points in all of our tasks anyways. The only advantage to enabling round robin is the ability to set multiple tasks to the same priority and define time quanta for how long they can run, but since we have scheduling points defined everywhere the OS will automatically switch to another task at the same priority at that point, rather than after a time quanta.


Parameters

Hi,
I have an inversion on one chromosome that I would like to highlight.
I added
fill=red        stroke=red
But it is shown behind the other lines and I would like it to be above the other lines?
Second question, how can I get the bottom chromosome names to be under the chromosome banner and not inside it?
Thanks,

yes,  you can  remove   [this chr link  line  ] to the end of   link. file


Fix mqtt config

My original code was broken - I knew it was too good to be true (it working first time, untested!).
My #ifdef checks around MQTT_USERNAME etc was never going to work as they are not #defines but static constants.
So I have changed the MQTT initialisation code so it now works, testing for NULL rather than #ifdef.
I have also removed the STATIC_XXX config options for now - are you happy with this? We could add them back in if we think they are needed, and add back the ENABLE_DHCP defines etc. But I just figured they are very unlikely to be used, and once we get this admin UI working it can all be handled via that anyway.
FYI - I have pushed PRs to the StateMonitor, StateController and SmokeDetector firmwares with the same changes.

Relates to https://github.com/OXRS-IO/OXRS-IO-MQTT-ESP32-LIB/issues/5

I'm not sure if every user wil be happy with DHCP controlled IP-addresses only. For some of my home control gear I like to use static IP-addresses.  It's pretty much personal taste I think.
Can't test MQTT with username/password

Yeah it is a fair point. I would imagine the large majority would be happy with dhcp or static leases, but there will always be exceptions.
I think we merge this for now and come back if someone requests it.
And once we build this admin UI we will likely add support for this sort of thing.
Happy with that?

FYI - the reason I wanted to simplify all this in the first place was that config.h was getting pretty busy with loads of flags and ENABLE_XXX switches, which then turned on other variables etc.
Due to the nature of the OXRS eco-system we ideally want to ship devices with working firmware and allow users to configure via our Admin UI (once it is built). Without having to fire up a programmer or IDE...
It is hard to find the balance between being customisable enough, but not overly complicated!

I totally see your point and personally don't have a problem with this. Just wanted to point out the very likely demand on static IP.
Our installed base will probably grow slow so that  there will be a good chance to come up with changes when requested.


Update steam-auto-queue.user.js

Add skip agecheck

Hi @Kasp42, thanks for the update! Would you mind submitting this to the development branch instead if it's not too much trouble? I like to do testing in that branch before merging into the master branch. Part of the reason for this is because I use several other scripts on Steam and I like to make sure nothing conflicts or causes problems. For example, I use Enhanced Steam, and one of the features it has is to automatically skip the age check that you added code for. It shouldn't cause a problem in this case, but you just never know what someone else's code might be doing.
Also, is it necessary to randomly choose the month, day, and year? Would it be better to simply select January 1, 1900 (or whatever the lowest year is)? That's what I was planning on doing anyway in the next update. I'd prefer it to do that, but I'm open to suggestions.
Thanks again for the contribution!


AdminCreateOrg json unmarshal error

Trying to use gitea go sdk (import "code.gitea.io/sdk/gitea"), the
client.AdminCreateOrg() function returns the following error
json: cannot unmarshal array into Go value of type map[string]interface {}

running with gitea server in docker : 2016 Gitea Version: 1.0.0+276-g9d2b8302

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

FYI, the bug is located in https://github.com/go-gitea/go-sdk/blob/master/gitea/gitea.go#L76 .
When there is an error, the JSON string is, for example [{"fieldNames":["UserName"],"classification":"RequiredError","message":"Required"}] (a one element array)

Thanks. Could you send a PR to fix that?

Should this be corrected rather in go-sdk or in gitea API (https://github.com/go-gitea/gitea/blob/master/routers/api/v1/admin/org.go) ?

The issue is in Gitea API. Since we're returning a 200 OK instead of 400 Bad Request

BTW for errors of kind 422 this PR fixes this issue https://github.com/go-gitea/go-sdk/pull/89
though there could be other 4XX errors that are returned we may want to do something similar. I wonder if we should return all other 4XX errors like the 422 error in this PR?


machine_configuration: Add MCO to disable in-tree i915 and intel_vsec…

… driver
There was a conflict between in-tree i915 drivers and the out of tree drivers. So blacklist the in-tree drivers so that the out of tree drivers can be loaded properly.

It looks good to me.


Update framework examples for v3

[ ] React example
[ ] Vuejs
[ ] Svelte

Should use latest versions of the lib, the framework, node, vite. Let's also doublecheck we're using the canonical starter kit for the respective frameworks.

@sophiedeziel  Suggestion to move them to separate repos. This has many benefits:

easy to 'deploy on push'
no more dependabot clobbering the main repo
easy to fork for reproduction scenarios
less clutter in the main lib

This might be a prompt to move the lib to an org!

I agree with everything in that last comment. We talked about this in the past.
It requires effort to setup all the different repos with the dependabot/deploy setup that we have. But it may be worth it on the long run.


fp16 overflow in GPT-2

When trying to train in mixed precision, after casting model weights to fp16 overflow is bound to occur since multiplication by 1e10 is used to mask the attention weights.
I noticed BERT multiplies by 1e4 (within fp16 range) instead, and the overflow problem doesn't occur and now it's training happily :)
I'm happy to make the various changes and PR if wanted?

Hi @andrewPoulton, yes indeed we could update that for GPT-2, would be happy to get a PR.
Can you check the generations are identical for a few seeds (it should be)?

Yeah, sure - what generations do you mean?

Fixed with #495


Multi SHot/ AImed Shot bugged with Pfui

Hello, Aviana
I'm glad to see you have just released a new version of Yaht. The only problem is that with Pfui... the multishot/ aim shot cast bar are bugged when pfui is turned on. What and How do I fix Yaht to function properly with my Pfui. I'm very interested in using this epic add on so it would be great if you can let me know what I can do to fix the problem.
Lastly, I'm trying to find out where the delay option is on the mod so I can adjust the multi shot and aim shot timer as shown here.
https://www.youtube.com/watch?v=xgw5TDDWmTI&list=PLZm1l6JD54o8yhkbjCV1agvkORDFB86yJ&index=17&t=0s

Pfui does its own castbars for aimed / multi shot and what you linked in the video is a modified version not made by me.


[Roadmap] Reply to specific parts of text

Why
Users should be able to (quickly) respond to certain parts of the AI response. Plain and simple feature, but massively improves QOL.
Description
Much like ChatGPT, when a user selects a certain part of the conversation/reply, a small bubble should appear where clicking the bubble copies the highlighted text into the message box. I'm aware that a similar menu already exists and opens on right clicking on text, but it might not be completely obvious for many users since most LLM UIs use this floating bubble method for replies/actions over selected text.

And the message box should turn something like this:

Requirements
Change to the message box to accommodate replies in some form, or maybe just copy the highlighted text to the message box. Personally I'd like the first option.
I'm willing to submit a pull request for this feature.

[ ] Implement highlighted text selection functionality.
[ ] Change the message composer box to accommodate replies.

This is another way of implementing this like Gemini. IMO, this is a bit overkill (in a good way) and completely doable, especially since this box already exists:

Hi @hardikbhatia777 did you make the second design? Looks really interesting and in the direction we'd love to implement this. Where can I see more of it?

@enricoros I didn't, this is Gemini's interface. Glad you like the suggestion 🚀
PS. I'm Seven on Discord :)

I like Gemini's work on the UI. Of all the UIs it's the most similar to my thinking for Big-AGI. This is a feature I had in mind for a while, and it's half implemented on main.

OpenAI implements it by inserting a system prompt right after the user prompt, and that kind of behavior really only works for OpenAI (most vendors do not support more than 1 system prompt, especially in the middle of text)
we'd have to abstract it for other models or disable the feature
Gemini has interesting and clearly prioritized operations
I'm trying to bring Beam on a selection level, which would be huge for remixing a paragraph with live preview; it's an easy feature that would just take a couple of days to implement but I don't have that kind of time now, would love for someone else to take it

Thanks for your feedback. I'd be happy to take this up over next week.
A small clarification - do you want the bubble over highlighted text like ChatGPT and Gemini have, or do you want this to be integrated within the right click menu which has copy, auto-diagram and speak functionalities?

Hi Seven, you'll find the UI changes on the main branch half implemented, as I started last week. In the ChatMessage.tsx file there are flags up top to enable the context (right click) menu, or the new Overlay menu, which works on a selection.
I think the overlay is better but has less space, especially on mobile. The overlay can fit the new Reply function and the former context actions (Copy, Speak, draw, diagram), but not much more.
What do you think? I like the Gemini looks best, but many users (especially on Mac) never right click, so the 'overlay' presentation is best. Alternatively, it could be a multi-line menu.
Status of implementation:

[x] selection overlay framework
[x] showing the reply text on the Composer
[ ] implementation of the reply-to function (OpenAI injects a system message that you can see in the network logs)
[ ] implementation of "cut" (really useful)
[ ] implementation of other functions (shrink, expand..)

Fully implemented on unreleased branch.

@hardikbhatia777 this is how it looks like:

Looks great!


[2.5] Add conditions for sidecar auditLog.destination in deployment.yaml

Supersedes https://github.com/rancher/rancher/pull/26193 for Rancher v2.5
Backport https://github.com/rancher/rancher/pull/35805

Bump


Multiple Connections to Same PLC

Hi,
Is there any way I can make multiple connections to same PLC. Every time I try to do that, the script timeout from the first connection.
(Loved the program)

I am not that good in programming. Can you explain how to use the following to make two connections to same PLC at same time.
"I added this functionality to the open method. Now the method open generate a random CID and VSN"


FEATURE: Separated key shorcuts for each file type

Hi,
It would be really nice if you could set up shortcut for each file type. Its a lot faster whe you dont have to "scroll" through files. You can take inspiration from VS code plugin called "angular2-switcher" (https://marketplace.visualstudio.com/items?itemName=infinity1207.angular2-switcher). Also would be cool if you could open new file aside of the first one (where you triggered the action).

It would be really nice if you could set up shortcut for each file type. Its a lot faster whe you dont have to "scroll" through files. You can take inspiration from VS code plugin called "angular2-switcher" (https://marketplace.visualstudio.com/items?itemName=infinity1207.angular2-switcher).

I actually started work on this a couple of years ago, and there is even a commit where I directly reference angular2-switcher: https://github.com/jyjor/angular-file-picker. While testing it, I didn't like that I actually had to think about which shortcut button to press, and found it less mentally taxing to press the same button once or twice in quick succession.
As a side note, my personal settings don't include the test file. There is already a shortcut for it, and I typically only work on the test file after the html and css is pretty final.
I haven't checked, but I'd bet there is a plugin that does this already. If not, you are welcome to reference the above project and submit a pull request here or create your own plugin.

Also would be cool if you could open new file aside of the first one (where you triggered the action).

If I understand what you are suggesting, this should already be supported:
Settings → Tools → Angular File Switcher → Other Settings → Close other component files → Never


Lock the process method in GroupByFunction class

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #43409
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[ ] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Closing as this need a revisit


Composite approach for checking in-filter values set in column dictionary

Currently, for checking the in-filter values in a column dictionary we use a binary search per value in the set. That works well for smaller value-sets but starts slowing down as the number of values in the set increase. To accommodate for large value-sets arising from large in-filters or from joins being pushed down as in-filters, we use sorted merge algorithm for merging the set and dictionary for larger values.
The following benchmark was run to find the cutoff point :
Benchmark     (dictionarySize)  (filterToDictionaryPercentage)  (selectivityPercentage)  Mode  Cnt        Score       Error  Units
binarySearch           1000000                               1                       10  avgt   10    11271.575 ±   621.620  us/op
binarySearch           1000000                               1                      100  avgt   10    16751.127 ±   580.550  us/op
binarySearch           1000000                               2                       10  avgt   10    25387.245 ±  1795.582  us/op
binarySearch           1000000                               2                      100  avgt   10    19707.334 ±   973.384  us/op
binarySearch           1000000                               5                       10  avgt   10    37256.779 ±  2287.203  us/op
binarySearch           1000000                               5                      100  avgt   10    47391.511 ±  1689.971  us/op
binarySearch           1000000                              10                       10  avgt   10    76204.615 ±  6515.056  us/op
binarySearch           1000000                              10                      100  avgt   10    71483.416 ±  7197.376  us/op
binarySearch           1000000                              12                       10  avgt   10  139481.091 ± 15513.357  us/op
binarySearch           1000000                              12                      100  avgt   10  142881.846 ±  9511.367  us/op
binarySearch           1000000                              15                       10  avgt   10   113786.273 ±  4123.158  us/op
binarySearch           1000000                              15                      100  avgt   10   165300.278 ± 10555.479  us/op
binarySearch           1000000                              20                       10  avgt   10   138410.942 ± 14330.367  us/op
binarySearch           1000000                              20                      100  avgt   10   137543.621 ±  9273.845  us/op
binarySearch           1000000                              30                       10  avgt   10   206512.608 ± 13497.954  us/op
binarySearch           1000000                              30                      100  avgt   10   305317.908 ± 12452.686  us/op
binarySearch           1000000                              50                       10  avgt   10   328867.893 ± 14594.249  us/op
binarySearch           1000000                              50                      100  avgt   10   332823.291 ± 26349.158  us/op
binarySearch           1000000                             100                       10  avgt   10   668720.906 ± 49193.818  us/op
binarySearch           1000000                             100                      100  avgt   10  1014546.405 ± 30709.670  us/op
sortedMerge            1000000                               1                       10  avgt   10    47220.743 ±  2598.755  us/op
sortedMerge            1000000                               1                      100  avgt   10    53634.485 ±  2886.296  us/op
sortedMerge            1000000                               2                       10  avgt   10    51201.356 ±  2745.801  us/op
sortedMerge            1000000                               2                      100  avgt   10    53046.058 ±  4500.987  us/op
sortedMerge            1000000                               5                       10  avgt   10    58501.742 ±  7320.870  us/op
sortedMerge            1000000                               5                      100  avgt   10    65597.519 ±  7356.548  us/op
sortedMerge            1000000                              10                       10  avgt   10    75347.468 ±  9417.556  us/op
sortedMerge            1000000                              10                      100  avgt   10    74601.584 ±  5251.078  us/op
sortedMerge            1000000                              12                       10  avgt   10   64838.734 ±  2644.738  us/op
sortedMerge            1000000                              12                      100  avgt   10   80342.737 ±  5414.306  us/op
sortedMerge            1000000                              15                       10  avgt   10    83345.836 ±  6034.488  us/op
sortedMerge            1000000                              15                      100  avgt   10    78405.299 ±  1651.375  us/op
sortedMerge            1000000                              20                       10  avgt   10   111307.577 ± 10924.456  us/op
sortedMerge            1000000                              20                      100  avgt   10    89371.173 ± 10347.814  us/op
sortedMerge            1000000                              30                       10  avgt   10   116740.355 ±  6003.945  us/op
sortedMerge            1000000                              30                      100  avgt   10   117312.763 ±  6325.076  us/op
sortedMerge            1000000                              50                       10  avgt   10   132145.411 ± 23121.259  us/op
sortedMerge            1000000                              50                      100  avgt   10   192802.722 ± 39032.876  us/op
sortedMerge            1000000                             100                       10  avgt   10   216079.634 ± 28725.333  us/op
sortedMerge            1000000                             100                      100  avgt   10   236561.476 ± 14369.673  us/op

This PR has:

[x] been self-reviewed.

[ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)

[ ] added documentation for new or modified features or behaviors.
[x] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] added integration tests.
[ ] been tested in a test Druid cluster.

@rohangarg - thanks for putting these benchmarks. In terms of query latencies, what difference have you observed?


Problems connecting to GW Instek MFG-2230-M

I think this is an implementation issue at GWI, but wondered if anyone had any ideas or previous experience? I suspect this is all due to me not understanding the difference between VISA, VXI, LXI etc., but I have been working happily with PyMeasure in a way that seems to work OK, until I hit this problem.
I have several instruments that all seem to work quite happily, but not this one (GW Instek MFG-2230-M). I think it will only accept VISA connections, so a connection string something like:
“TCPIP :: <IP_ADDRESS> :: 1026 :: SOCKET”
.. which is rejected by the vxi11 library as a malformed string, and presumably it would need to parse the socket number as well, rather than performing the vxi protocol (or whatever it is) to establish a socket.
If I try a connection string like: “TCPIP :: <IP_ADDRESS> :: INSTR”, this is accepted by the vx11 library, but I just get a "connection refused" error when I try to send a message.

My bad. This is nothing to do with VXI11. The working examples above are nothing to do with VXI11 either. I'm still trying to work put what all these standards are ..
The bottom line seems to be that although GWI claim to have LAN remote support for this model, it only implements a very low-level raw serial protocol on a fixed port. I believe this should be connectable using a suitable VISA implementation, or even a raw socket, but I haven't had much success.
I'll leave this open for now, just in case someone has a bright idea, but happy to close it if you prefer.


Dynamically switch orthographies

Switch orthographies from a drop-down menu.
Addresses the following user stories:

As a Cree language learner, I want to see all written Cree in Standard Roman Orthography with circumflexes (âêîô).
As a Cree language learner, I want to see all written Cree  in Standard Roman Orthography with macrons (āēīō).
As a Cree language learner, I want to see all written Cree in Western Cree syllabics.

For the sake of explicitness, this selection of orthography concerns Cree words anywhere in the application, not just in the paradigms or normatized search results, but in the interface as well - if I've understood correctly our discussions with Eddie.

For the sake of explicitness, this selection of orthography concerns Cree words anywhere in the application, not just in the paradigms or normatized search results, but in the interface as well - if I've understood correctly our discussions with Eddie.

Correct. It should affect the display of Cree text EVERYWHERE!

I increased the priority of this, since I think it's pretty important to MESC. As well, I've been itching to implement it!


MINOR: Temporarily restore SslFactory.sslContext() helper

The sslContext() method was recently removed in #6674 as part of a refactoring. Even though this is not a public API, removing the method would break any non-AK components that use this class to easily set up SSL clients. Since the cost of keeping this is low, this PR restores the method temporarily to give developers time to move away from reusing this utility class that is not part of the AK public API.
This should be backported to the 2.3 branch, which is where #6674 was originally applied.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

LGTM


Setup Auto Deployments from Travis

There should be an automated deployment for the site on commits to master. Currently changes have to be manually pulled and re-built.

This is possible via Harvey.


[Bug]: Application requesting Location Permission on launch time.

Mapbox Implementation
Mapbox
Mapbox Version
~> 10.10.0
Platform
iOS
@rnmapbox/maps version
10.0.0-beta.65
Standalone component to reproduce
import MapboxGL from "@rnmapbox/maps"

<MapboxGL.MapView style={styles.map} />

Observed behavior and steps to reproduce
No response
Expected behavior
application should only request permission when user tap on location button or  if Mapbox use <MapboxGL.UserLocation/>
Notes / preliminary analysis
No response
Additional links and references

No response

I'm seeing this as well

Fixed by:  #2586