Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Ryan Riley
@panesofglass
@granicz just started working on (finally) building C4F# in F#. Plan to try this out with that project. I'll post code soon.
Adam Granicz
@granicz
Howdy folks - I am giving a short talk tomorrow in Vienna about WebSharper Warp
Not sure if this will be aired, but if possible i will try to encourage it and share the links here (or to the recording later)
Jacqueline S. Homan
@jacqueline-homan
@granicz , that would be awesome! That way, this developer in rural northwestern Pennsylvania in the US can see it, even if I have no way to be able to get there.
Stachu Korick
@StachuDotNet
Yes, please record :D
oh wait that was yesterday
@granicz was it recorded?
Raymen Scholten
@raymens
Would love to see it too
Jerold Haas
@jeroldhaas
@panesofglass when you have time, I'd like to discuss sth in direct message
or skype, if that's better suited for you
Adam Granicz
@granicz
@jacqueline-homan @StachuK1992 Unfortunately, that session was not recorded but I am happy to start a regular "tech call" - details will follow
the idea is to have a regular WebSharper screencast and show stuff
@fpawel - Re #5, there is a fix in the repo, can you check with a local build if that resolves the issue you were seeing?
Ryan Riley
@panesofglass
@granicz you are welcome to use C4F# to host a screencast any time. I would love to have you or @Tarmil on to talk about the latest enhancements!
@granicz that said, I am sure a dedicated channel of W# screen casts would also be good for IntelliFactory
András Jankó
@Jand42
NuGet packages for new WebSharper release are currently uploading: http://websharper.com/blog-entry/4412
This contains fixes for problems with generic constructors and nested types encountered previously with Warp
András Jankó
@Jand42
New version of WebSharper released, with multiple fixes for translating with reflection, used by Warp http://fpish.net/blog/loic.denuziere/id/4418/2015714-websharper-3-2-22-released
Paul Blair
@psfblair
Having a little issue using query parameters with Warp:
type Endpoints =
| [<EndPoint "GET /db">] SingleQuery
| [<EndPoint "GET /queries">][<Query("queries")>] MultipleQuery of int
Gives me
System.Exception: Error starting website:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Cannot cast from source type to destination type.
at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)
at WebSharper.Compiler.ReflectionLayer+Reflection+-ctor@686-10.Invoke (System.Object x) [0x00000] in <filename unknown>:0
at WebSharper.Compiler.ReflectionLayer+Reflection+ConvertAttributes@696-1.GenerateNext (IEnumerable1& next) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase1[WebSharper.Compiler.ReflectionLayer+CustomAttributeArgument].MoveNextImpl () [0x00018] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-1f79c04/src/fsharp/FSharp.Core/seq.fs:764
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase1[WebSharper.Compiler.ReflectionLayer+CustomAttributeArgument].System-Collections-IEnumerator-MoveNext () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-1f79c04/src/fsharp/FSharp.Core/seq.fs:793 at Microsoft.FSharp.Collections.SeqModule.ToList[CustomAttributeArgument] (IEnumerable1 source) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-1f79c04/src/fsharp/FSharp.Core/seq.fs:221
at WebSharper.Compiler.ReflectionLayer+Reflection+ConvertAttributes@692.GenerateNext (IEnumerable1& next) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase1[WebSharper.Compiler.ReflectionLayer+CustomAttribute].MoveNextImpl () [0x00018] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-1f79c04/src/fsharp/FSharp.Core/seq.fs:764
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase1[WebSharper.Compiler.ReflectionLayer+CustomAttribute].System-Collections-IEnumerator-MoveNext () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-1f79c04/src/fsharp/FSharp.Core/seq.fs:793 at Microsoft.FSharp.Collections.SeqModule.ToList[CustomAttribute] (IEnumerable1 source) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-1f79c04/src/fsharp/FSharp.Core/seq.fs:221
at WebSharper.Compiler.ReflectionLayer+Reflection+Converter.ConvertAttributes (IList1 attrs) [0x00000] in <filename unknown>:0 at WebSharper.Compiler.ReflectionLayer+Reflection+-ctor@753-15.Invoke (Microsoft.FSharp.Core.Unit unitVar) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Control.LazyExtensions+Create@5771[Microsoft.FSharp.Collections.FSharpList1[WebSharper.Compiler.ReflectionLayer+CustomAttribute]].Invoke () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-1f79c04/src/fsharp/FSharp.Core/prim-types.fs:5771
at System.Lazy1[Microsoft.FSharp.Collections.FSharpList1[WebSharper.Compiler.ReflectionLayer+CustomAttribute]].CreateValue () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.2/mcs/class/corlib/System.Reflection/MonoMethod.cs:238
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr2/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.2/mcs/class/corlib/System
If I take out [<Query("queries")>] it works fine.
Adam Granicz
@granicz
[<Query(...)>] declares a given sitelet endpoint argument to be a GET parameter
which also means you need to name that argument, so you can pass it to [<Query(...)>]
so in your case:
...
| [<EndPoint "GET /queries">][<Query("whatever")>] MultipleQuery of whatever: int
this will then match URLs like /queries?whatever=1
Paul Blair
@psfblair
Got it. (I did know that the "queries' in the path was distinct from the "queries" parameter; I was working with a requirement that wanted the URI to be /queries?queries=## -- but I didn't know about the naming part.) Thanks!
Adam Granicz
@granicz
hi guys, just some heads-up: we are moving some Warp functionality back to WebSharper - stuff like Warp.Page(..) will now also be available as standard sitelet Content.Page(...)
the Warp.* names will remain aliases, so existing code doesn't break
essentially, warp will have the OWIN/server-related functionality, in a way becoming a web server productivity library
and WebSharper will get all the ex-Warp shorthands and conveniences, as one would expect
Adam Granicz
@granicz
this is now released in 3.4
Paul Blair
@psfblair
Great!
István Gansperger
@qwe2
in the current Warp version the readme doesn't suggest a reference to UI.Next and by adding #I "../packages/WebSharper.UI.Next.3.4.9.157/lib/net40" I still get The type referenced through 'WebSharper.UI.Next.Doc' is defined in an assembly that is not referenced. You must add a reference to assembly 'WebSharper.UI.Next'.. It only works if i explicitly reference the .dll with #r.
am I overlooking something? I would expect it to work with #I just the same.
Adam Granicz
@granicz
right, Warp now depends on UI.Next too
if it's not mentioned in readme.txt, it should be
as for #I vs #r - the former only specifies a new search folder, it doesn't load or reference anything like the latter
Ryan Riley
@panesofglass
Is warp getting subsumed by WebSharper now? Will it continue to be a separate package?
Adam Granicz
@granicz
no, see above
it will remain a separate package, refocused to self-hosting and scripted use only.
so it's another way to run sitelets (via OWIN+Microsoft.Owin), and it has a runtime to support interactive (in FSI) applications
Ryan Riley
@panesofglass
Thanks, @granicz!
Btw, I started re-working the OWIN support to use Arachne. I tried starting with raw OWIN, but there's quite a lot of boilerplate.
I'm not making it a major effort; I'm mostly using it to better learn Arachne. However, I'm happy to submit it as a PR if you find it interesting.
I have yet to pull in Arachne, but you can follow progress here: panesofglass/websharper.owin#1
Adam Granicz
@granicz
(Hi all - please use the https://gitter.im/intellifactory/websharper room for Warp-related discussions - added everyone from here to that channel for convenience, talk to you there!)