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

Disable cache in CLI #1535

Merged
merged 2 commits into from Apr 27, 2017

Conversation

Projects
None yet
3 participants
@matthid
Copy link
Collaborator

commented Apr 27, 2017

No description provided.

@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

@nosami Can you check if this works?

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

Yes. Give me a minute. I would expect it to work apart from the caching tests :)

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

Same error

when running script
requested token for ConstructorBuilder

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder.build_metadata (System.Reflection.Emit.ModuleBuilder) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.ModuleBuilder.Save () [0x001ad] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (string,System.Reflection.PortableExecutableKinds,System.Reflection.ImageFileMachine) [0x0022b] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (string) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at Fake.FSIHelper.handleCaching<a_REF> (bool,Yaaf.FSharp.Scripting.IFsiSession,a_REF,System.IO.DirectoryInfo,Fake.FSIHelper/CacheInfo) [0x00046] in <5901cdec7c20dbeda7450383eccd0159>:0
  at Fake.FSIHelper.runScriptUncached (bool,string,System.Collections.Generic.IEnumerable`1<string>,bool,Fake.FSIHelper/CacheInfo,System.IO.TextWriter,System.IO.TextWriter) [0x00236] in <5901cdec7c20dbeda7450383eccd0159>:0
  at Fake.FSIHelper.runFAKEScriptWithFsiArgsAndRedirectMessages (bool,Fake.FSIHelper/FsiArgs,System.Collections.Generic.IEnumerable`1<System.Tuple`2<string, string>>,Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>,bool) [0x0015d] in <5901cdec7c20dbeda7450383eccd0159>:0
  at Fake.FSIHelper.executeBuildScriptWithArgsAndFsiArgsAndReturnMessages (string,string[],string[],bool) [0x00038] in <5901cdec7c20dbeda7450383eccd0159>:0
  at Test.FAKECore.when_running_script.RunExplicitWithResult (string,string[],string[],bool) [0x00023] in <5be32c41453a46b88625282d5ca4e474>:0
  at Test.FAKECore.when_running_script/<>c.<.ctor>b__25_1 () [0x0006c] in <5be32c41453a46b88625282d5ca4e474>:0
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004d] in <5357e6452d21439088fd8589dfcf1134>:0
  at <unknown> <0xffffffff>

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

Are the tests using the CLI?

@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

No

@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

@nosami I looked at the code again. I think the binary should actually work (even when the tests don't).
Problem is that it is hard to make the caching tests ignore failures on specific mono versions, they are quite strict in that regard. The new fix might be green or maybe not but the binary should work...

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

I've only managed to repro this bug so far through the test suite. The FAKE binary works against FCS

@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

Ok so mono seems to choke with the following code

open System
type MyAttr() =
  inherit Attribute()
  do failwith "test"

[<MyAttr()>]
type Test () =
  do ignore ()
[<assembly: MyAttr()>]
do ()

@nosami can you verify? At least that's the one we are using in the Test-case that probably failed.

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

✔ ~/src/faketest
12:27 $ cat faketest.fsx
open System
type MyAttr() =
  inherit Attribute()
      do failwith ""test""

      [<MyAttr()>]
      type Test () =
        do ignore ()
    [<assembly: MyAttr()>]
    do ()
✔ ~/src/faketest
12:27 $ fsharpi faketest.fsx

/Users/jason/src/faketest/faketest.fsx(7,7): error FS0010: Incomplete structured construct at or before this point in member definition

@forki forki merged commit 1f38e51 into fsharp:master Apr 27, 2017

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

you intendation is off. And you need to run it with FAKE as fsharpi is probably just working (as there is no cache)

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

oops. paste bug

12:31 $ cat faketest.fsx
open System
type MyAttr() =
  inherit Attribute()
  do failwith ""test""

[<MyAttr()>]
type Test () =
  do ignore ()
[<assembly: MyAttr()>]
do ()
✔ ~/src/faketest
12:31 $ fsharpi faketest.fsx

/Users/jason/src/faketest/faketest.fsx(4,17): error FS0039: The value or constructor 'test' is not defined. Maybe you want one of the following:
   Set
   set
   Text

Looks some error with failwith

@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

Ah sorry I failed the quotes because of escaping in the C# string :)

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

Yeah.. just spotted :)

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

12:34 $ fake
requested token for ConstructorBuilder

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder.build_metadata (System.Reflection.Emit.ModuleBuilder) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.ModuleBuilder.Save () [0x001ad] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (string,System.Reflection.PortableExecutableKinds,System.Reflection.ImageFileMachine) [0x0022b] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (string) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at Fake.FSIHelper.handleCaching<a_REF> (bool,Yaaf.FSharp.Scripting.IFsiSession,a_REF,System.IO.DirectoryInfo,Fake.FSIHelper/CacheInfo) [0x00046] in <5901b853ccf1c534a745038353b80159>:0
  at Fake.FSIHelper.runScriptUncached (bool,string,System.Collections.Generic.IEnumerable`1<string>,bool,Fake.FSIHelper/CacheInfo,System.IO.TextWriter,System.IO.TextWriter) [0x00236] in <5901b853ccf1c534a745038353b80159>:0
  at Fake.FSIHelper.runFAKEScriptWithFsiArgsAndRedirectMessages (bool,Fake.FSIHelper/FsiArgs,System.Collections.Generic.IEnumerable`1<System.Tuple`2<string, string>>,Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>,bool) [0x0015d] in <5901b853ccf1c534a745038353b80159>:0
  at Fake.FSIHelper.runBuildScriptWithFsiArgsAt (bool,Fake.FSIHelper/FsiArgs,System.Collections.Generic.IEnumerable`1<System.Tuple`2<string, string>>,bool) [0x0002c] in <5901b853ccf1c534a745038353b80159>:0
  at Program/clo@76-1.Invoke (Microsoft.FSharp.Core.Unit) [0x00320] in <5901b85ef91bc6c0a74503835eb80159>:0
  at <StartupCode$FAKE>.$Program.main@ () [0x00407] in <5901b85ef91bc6c0a74503835eb80159>:0
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0004c] in <5357e6452d21439088fd8589dfcf1134>:0
@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

So at least we have a more minimal repro now. I guess we can verify now if the latest version (with the patch of this PR) is working. Thanks for the quick feedback.

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

It doesn't work using your patch

✔ ~/src/monodevelop/main/external/fsharpbinding [d15-2-fix-53895 L|✚ 16…319⚑ 14]
12:35 $ mono ~/src/fake/build/FAKE.exe
requested token for ConstructorBuilder

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder.build_metadata (System.Reflection.Emit.ModuleBuilder) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.ModuleBuilder.Save () [0x001ad] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (string,System.Reflection.PortableExecutableKinds,System.Reflection.ImageFileMachine) [0x0022b] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (string) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at Fake.FSIHelper.handleCaching<a_REF> (bool,Yaaf.FSharp.Scripting.IFsiSession,a_REF,System.IO.DirectoryInfo,Fake.FSIHelper/CacheInfo) [0x00046] in <5901d4357c20dbeda745038335d40159>:0
  at Fake.FSIHelper.runScriptUncached (bool,string,System.Collections.Generic.IEnumerable`1<string>,bool,Fake.FSIHelper/CacheInfo,System.IO.TextWriter,System.IO.TextWriter) [0x0023a] in <5901d4357c20dbeda745038335d40159>:0
  at Fake.FSIHelper.runFAKEScriptW
@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

Ah so mono is crashing completely. Oh

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

Yeah... and running the same script with fsharpi is fine.

@nosami

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

Looks like a Mono/Cecil issue

@forki

This comment has been minimized.

Copy link
Member

commented Apr 27, 2017

this is released now.

@matthid matthid referenced this pull request Apr 27, 2017

Merged

Upgrade fcs and fscore #1534

@matthid

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 27, 2017

Next try: #1536

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.