Announcement

Collapse
No announcement yet.

[CLOSED] [#883] [1.11.1] Changed Definition-Order?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] [#883] [1.11.1] Changed Definition-Order?

    Hello,

    i'm not really sure if it is a bug, but in Bridge v1.11.0 the definition-order changed (it seems it is alphabetically now)

    Bridge v1.10.4:

    Bridge.define('WebUI.Component', {
        inherits: [Bridge.IDisposable],
    [...]
    Bridge.define('WebUI.Control', {
        inherits: [WebUI.Component],
    [...]
    Bridge.define('WebUI.Button', {
        inherits: [WebUI.Control],
    [...]
    Bridge v1.11.0 (installed via NuGet):

    Bridge.define('WebUI.Button', {
        inherits: [WebUI.Control], // "Uncaught ReferenceError: WebUI is not defined"
    [...]
    Bridge.define('WebUI.Component', {
        inherits: [Bridge.IDisposable],
    [...]
    Bridge.define('WebUI.Control', {
        inherits: [WebUI.Component],
    [...]
    Thanks in advance & Greetings ... Peter

    #2
    Hi Peter,

    Thank you for the report!

    There were changes in topological sorting of classes to fix some cases. Maybe, those changes broke your case.

    Is there a chance you could provide a test case to reproduce the issue? Once we reproduce it locally, we should be able to fix and, maybe, release a 1.11.1 patch.

    Comment


      #3
      Hi,

      I tried to reproduce the issue but I was not able.

      Here is my test case (i tried various order in in C#)
      namespace Demo
      {
          public class Button : Control
          {
          }
      
          public class Control : Component
          {
          }
      
          public class Component : IDisposable
          {
              public void Dispose()
              {
                  throw new NotImplementedException();
              }
          }
      }

      Comment


        #4
        Hello Daniil,
        Hello Vladimir,

        thanks for your quick replies!

        i take a look at the bridge.log and found this:

        Bridge.Build.Task: Warning 2016-02-25T13:31:41:716 Topological sort failed with error System.InvalidOperationException: Cannot order this set of processes
        at TopologicalSorting.DependencyGraph.CalculateSort(T opologicalSort instance)
        at TopologicalSorting.DependencyGraph.CalculateSort()
        at Bridge.Translator.Emitter.TopologicalSort()
        I guess this could be the reason why my sort-order differs from yours.

        And i guess that it is difficult for you to say why the 'Topological sort failed'. Should i send my Project to you?

        Greetings ... Peter

        Comment


          #5
          Yes, we want to investigate your project. Can you post public link to your project (for example, Google.Disk or something similar)?
          Last edited by Vladimir; 2016-02-25 @ 01:12 PM.

          Comment


            #6
            Please post a code sample in the forums demonstrating how to reproduce the issue. Or, provide a public download link of your project. Any code submitted privately via email will be deleted without being opened.

            Comment


              #7
              Hello Daniil,
              Hello Vladimir,

              thanks again for your supply!

              This ist very strange: I have recreated my project in order to find the position which causes the error and now everything works as expected.

              All's well that ends well! :)

              Sorry for the circumstances!

              Greetings ... Peter

              Comment


                #8
                Hi PeterT: Be sure to let us know if you run into this again, or are able to reproduce in any way. We would be very interested in a case that could reproduce.
                Last edited by geoffrey.mcgill; 2016-02-26 @ 07:05 AM.

                Comment


                  #9
                  phew, i got it:

                  namespace System.Windows.Forms {
                  
                      public static class Globals {
                          public static int myVar;
                          public static TextBox myTextBox;
                      }
                  
                      public class Control {
                          static int test = Globals.myVar;
                      }
                  
                      public class Button : Control { }
                  
                      public class TextBox : Control { }
                  
                  }
                  Greetings ... Peter

                  Comment


                    #10
                    @Hi PeterT

                    Thank you for the test case. We can reproduce the issue now.

                    The fix will be included into the upcoming 1.11.1 release.
                    Last edited by Leonid; 2016-02-26 @ 08:35 PM.

                    Comment


                      #11
                      Hello @Leonid,

                      great! Thanks a lot!

                      Greetings ... Peter

                      Comment


                        #12
                        Hi PeterT,

                        Thank you for the test case.

                        We have fixed the issue. The fix will be included into the upcoming 1.11.1 release.

                        Please let me know if you need the fix before the release - I can send you the latest Bridge nuget package.

                        Comment


                          #13
                          Hello Leonid,

                          Originally posted by Leonid View Post
                          Please let me know if you need the fix before the release - I can send you the latest Bridge nuget package.
                          this would be very nice -> tuebben [at] gmail [dot] com

                          Thanks in advance & Greetings ... Peter

                          Comment


                            #14
                            Hello PeterT ,

                            I sent Bridge nuget package to you.

                            Comment

                            Working...
                            X