Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 21 23:39
    geoffreymcgill commented #4048
  • Aug 21 23:37
    geoffreymcgill milestoned #4048
  • Aug 21 12:34
    stepan-beresnev commented #953
  • Aug 21 12:00
    CLAassistant commented #4047
  • Aug 20 20:36
    geoffreymcgill milestoned #4046
  • Aug 20 20:36
    geoffreymcgill labeled #4046
  • Aug 20 20:36
    geoffreymcgill assigned #4046
  • Aug 20 20:35
    ChrML opened #4046
  • Aug 20 09:49
    Triogap opened #4045
  • Aug 20 06:04
    ChrML opened #4044
  • Aug 19 11:42
    kosmab commented #4043
  • Aug 17 17:32
    geoffreymcgill commented #4043
  • Aug 17 17:32
    geoffreymcgill commented #4043
  • Aug 17 17:32
    geoffreymcgill labeled #4043
  • Aug 17 17:32
    geoffreymcgill assigned #4043
  • Aug 17 17:22
    kosmab opened #4043
  • Aug 16 15:53
    geoffreymcgill milestoned #4042
  • Aug 16 15:53
    geoffreymcgill assigned #4042
  • Aug 16 13:03
    Rudokus opened #4042
  • Aug 12 20:48
    fabriciomurta labeled #4041
Rubem Rocha
@pardalrocha_twitter
Any forecast of when will it be possible to debug Bridge.NET applications within Visual Studio?
Rubem Rocha
@pardalrocha_twitter
??
Fabrício Zimmerer Murta
@fabriciomurta
I am afraid the closest we are from it is having source maps support. I believe this should not be very hard to attach Visual Studio debugger to a Bridge running application, but maybe it wouldn't link the mapped source directly to the very source code file that resulted in it (although you'd see the exact C# code it was compiled with).
Maybe this is where you can get started with debugging straight from Visual Studio: https://docs.microsoft.com/en-us/visualstudio/javascript/debug-nodejs?view=vs-2019#debug-client-side-script
Worth a try?
Jpard6991
@Jpard6991
Hello all, I am doing some research for work and trying to determine if we can use Bridge.NET in place of scriptsharp, but we have some of the projects in the solution targeting .NET Framework 2.0. Are there any version of Bridge.Net that will work against a project targetting .NET Framework 2.0 instead of 4.0+?
Samuel
@samuelGrahame

@Jpard6991 i was looking at it, i just changed the .net framework in the bridge library to 2 using nodepad++ then removed the reference to the bridge.dll and re-added that dll. changed to target .Net Framework 2.0 i got it to and show hello world.

https://github.com/samuelGrahame/DotNetFramework2

Fabrício Zimmerer Murta
@fabriciomurta

It might work in simple cases, but you are not getting an implementation that should be compatible with .NET 2. It is like you're saying "I want to use .NET 2", then you say "no, don't include microsoft's core libs", then you include Bridge's core lib -- which represents .NET 4.

So I would expect some... well, side effects from that.

Fabrício Zimmerer Murta
@fabriciomurta
@samuelGrahame by a big coincidence, unless @Jpard6991 is that person in stack overflow, somebody else asked about running Bridge in .NET 2 yesterday and I just mentioned your experience (with links and citation) in the answer. Let me know if you have any concerns about it, or if proper credit was not passed on.
Here's the question (and answer), for reference: https://stackoverflow.com/questions/57190589/how-can-i-add-bridge-net-to-my-existing-c-sharp-project/57205835#57205835
Samuel
@samuelGrahame
Yeah that's fine
adaris
@MarcoTheFirst
Hi, Bridge 17.9 seems to fail miserably on IE11:
adaris
@MarcoTheFirst
image.png
I know IE11 is pure crap, but unfortunately we still have customers on there
Geoffrey McGill
@geoffreymcgill
This .startsWith error is an easy fix.
Samuel
@samuelGrahame
if (!String.prototype.startsWith) {
    String.prototype.startsWith = function(searchString, position){
      position = position || 0;
      return this.substr(position, searchString.length) === searchString;
  };
}
https://stackoverflow.com/questions/36213455/add-startswith-in-ie-11
should be able to inject before bridge is loaded.
adaris
@MarcoTheFirst
cool @samuelGrahame Thanks a lot
alanmodikwa
@alanmodikwa
Screenshot 2019-07-29 at 17.57.45.png
I seem to get errors after adding my Bridge.net package on my library, how can i solve this problem?
eggsa
@eggersa
Hello. I came across a strange bug with asynchronous code together with TaskCompletitionSource: https://deck.net/c35900a154d976dd1aba7bf66e6928e1
I am looking for a workaround
adarisGmbH
@adarisGmbH
@geoffreymcgill if you could help us urgently with the problem @eggersa reported, we‘d appreciate it... we have a release tonight depending on it. Thanks !
Fabrício Zimmerer Murta
@fabriciomurta
@alanmodikwa: what are your project targetted against? Should be something betwee .NET Framework 4 to 4.8.0. .NET Standard or .NET Core won't do.
Fabrício Zimmerer Murta
@fabriciomurta
@eggsa, I think there's a mixup in the C# async tasks with jQuery's javascript async task, and they won't be interoperable like that.
The asynchronous paradigm with TaskCompletionSource follows C#'s System.Threading.Tasks which, even though it is mapped to run in javascript when translated, wouldn't just mingle up with Bridge.jQuery2's asynchronous paradigm (which is native JavaScript).
That code should be rewritten either as a fully jquery-targetted asynchronous task, or fully C#-targetted asynchronous task.
eggsa
@eggersa
@fabriciomurta Is there a way to properly map a jQuery Promise to a Task.
We tried Task.FromPromise before. But there where Issues too
Fabrício Zimmerer Murta
@fabriciomurta
I've tried a few things with little luck to setting the process' error state... but if I just call its SetResult(), it goes fine. Just not nice exception handling, I guess...

https://deck.net/381c3253bf979e9e2bf9fb3b6112e565

Notice (at least on chrome) this will never return the result, as the XHR request goes to a non-https endpoint -- and if you try to switch the endpoint to https, it'll fail due to faulty SSL certificate.

Evan Tobin
@evantobin
Before I make a pull request, is this a valid issue or is there some reason for having non-static versions of IndexOf? https://forums.bridge.net/forum/bridge-net-pro/bugs/6258-indexof-and-lastindexof-shouldn-t-be-instance-methods
Fabrício Zimmerer Murta
@fabriciomurta

@eggsa: although not a solution yet, I think I could narrow down your use case for this:
https://deck.net/f442867ddbc8cd6fb18cee6817a33b86

Although the code looks longer, I added comments and wrapped unit test class so I could write the code close to what it would look within our Bridge unit tests.
There are good chances this issue is tied to an unfortunate limitation in Bridge though.

Fabrício Zimmerer Murta
@fabriciomurta
@eggsa: the issue you are facing, after reducing it not to use Bridge.jQuery2, really looks like this reported issue: #4002
eggsa
@eggersa
@fabriciomurta Thank you very much for your help!
Fabrício Zimmerer Murta
@fabriciomurta
Maybe this helps you deal with your original deck. As suggested by the issue #4002's reporter, handling the exception outside makes it handle it nicely:
https://deck.net/4344fbc32483a758fcb3ec67069a2782
Fabrício Zimmerer Murta
@fabriciomurta

@evantobin: you make a great point with the "extra" behavior Bridge supports. Where it does not really mean a "bug" (because it supports what .NET does -plus- this instance call), it could mean nevertheless a smaller footprint for Bridge code. As it is by nature introducing a breaking change, we'll only be able to merge that up on a minor version release (currently next possible would be 17.10.0), which tends to be the case anyway.

Notwithstanding, I believe your contribution to this would be very appreciated by us!

And if/while you're into it, please log an issue in github before you send the pull request -- so we can bind the pr to the issue and give it the deserved "breaking-change" tag. Issues get to be our way of recording the changelog, that's why it'd be important part of the merge process.

It would also be very likely to break several other stuff around Bridge, in special the frameworks and unit tests.

In case you're scratching your head about dragons and unit tests: https://github.com/bridgedotnet/Bridge/wiki/Build-&-run-Bridge-self-Tests
Evan Tobin
@evantobin
Beautiful! I was wondering where the unit test target was.
Evan Tobin
@evantobin
@fabriciomurta if you want to add the breaking-change tag to my issue it's at bridgedotnet/Bridge#4033. I also have a PR open with the changed code and fixed tests.
The frameworks are always using the static Array.IndexOf method and not using the instance method
julniter
@julniter
Hi how do i export the items inside my type definition file?
Fabrício Zimmerer Murta
@fabriciomurta
Hello @julniter! You have a public project you would want supported by Bridge via retyped? Unfortunately we couldn't get to a point retyped could be used in the community by demand to include new projects. If your project is publicly hosted, you can create an issue in the retyped repo and request for support, providing information how to get the typescript definition file, so that your project is included in a future retyped build.
Bartolomeus-649
@Bartolomeus-649
Can you compile the .NET BCL as a TypeScript/JavaScript module, so you could use it just as a class library on the client side in all existing TypeScript/JavaScript sites?
Fabrício Zimmerer Murta
@fabriciomurta
BCL?
Bartolomeus-649
@Bartolomeus-649
Fabrício Zimmerer Murta
@fabriciomurta
You mean, build the whole .NET sources with Bridge? Like we do with a subset of .NET (https://github.com/bridgedotnet/Bridge/tree/master/Bridge/System )?
If I understand well, the problem about building everything is that some code is platform-specific, and most times we need some Bridge-specific attributes (like in https://github.com/bridgedotnet/Bridge/blob/master/Bridge/System/Action.cs)
Bartolomeus-649
@Bartolomeus-649
@fabriciomurta But is not the whole point of the bcl not to be platform dependant?
With each new release of .Net Standard, all of its functionality must be implemented on any platform who wants to support the new version.
And since it's supposed to be running just about everywhere, they cant depend on specific platform features.
So, by picking one of the first versions, there really should not be very much platform stuff at all.
Bartolomeus-649
@Bartolomeus-649
Here is 1.0: