Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TODO comments throughout the solution #23

Open
18 of 27 tasks
LSViana opened this issue Aug 20, 2023 · 2 comments · Fixed by #24 or #28
Open
18 of 27 tasks

Fix TODO comments throughout the solution #23

LSViana opened this issue Aug 20, 2023 · 2 comments · Fixed by #24 or #28
Assignees

Comments

@LSViana
Copy link
Collaborator

LSViana commented Aug 20, 2023

This list is not final and will be accumulated as items are solved:

  • Make it easier to connect OutputNative size with pointer size in MapEntryNative
  • Remove mentions about *Native counterpart for event classes that don't need it
  • Fix tests for XmlElement.Observe() that weren't using a root-level XmlElement but should be
  • Fix tests for XmlElement.Unobserve() that weren't using a root-level XmlElement but should be
  • Fix tests for XmlElement.Parent() that weren't returning the correct value
  • Fix tests for XmlElement.String() that weren't testing for child XmlText nodes but should be
  • Remove mentions about read-only transactions on writeable functions (they will be tested later, after exception handling is added)
  • Remove mention to test Transaction.Dispose()
  • Remove comment from Output.Object
  • Remove comment from Map.Length()
  • Remove comment from TextChannel
  • Remove comment for Doc.Guid that will not be fixed because the GUID format isn't compatible with C#
  • Remove comment from InputNative because the size of the data can't be reduced or data will be lost
  • Fix the constructor of Output to support null pointer
    • Update usages of new Output() to use ReferenceAccessor.Access(Output)
  • Implement test of getting null value from Map after fixing the Output constructor
  • Replace NotImplemented with NotSupported exception on the EventBranch constructor since all cases are now covered
  • Implement remaining tests marked as [Ignore] because they were waiting for implementations
  • Implement IEnumerator<T>.Reset() on the following classes:
    • ArrayEnumerator
    • MapEnumerator
    • XmlAttributeEnumerator
    • XmlTreeWalkerEnumerator
    • Remove the documentation mention about these classes only supporting one-time enumeration
  • Wrap the XmlElement with an XmlFragment before returning the value.
  • Wrap the XmlText with an XmlFragment before returning the value.
  • Dispose EventSubscription with Unsubscribe().
@SebastianStehle
Copy link
Collaborator

@LSViana We have this TODO in the code:



    // TODO This is a temporary solution to track the amount of transactions a document has open.
    // It's fragile because a cloned instance of the same document won't be synchronized and if a `Transaction`
    // is opened in the cloned instance, it'll receive `null` from the Rust side and will cause the
    // `ThrowHelper.PendingTransaction()` to run (which is acceptable since it's a managed exception).
    internal void NotifyTransactionStarted()
    {
        openTransactions++;
    }

    internal void NotifyTransactionClosed()
    {
        openTransactions--;
    }
    ```
    
    
    Do you think we will ever have a final solution or shall we just remove this and also close this issue?

@LSViana
Copy link
Collaborator Author

LSViana commented Jul 15, 2024

@SebastianStehle I think we'll have some solutions if we ever look into that in detail but I didn't do it yet.

Given that, I'd just leave it there. It's not harmful and informs other developers who read the same code which is a positive detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants