Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
85f4c50
Copy sources from Versions.props to NuGet.config (#7191)
Jul 11, 2019
5f1a882
Only check distinct errors (#7140)
forki Jul 11, 2019
d5ae449
Use 1-based column numbers in tests (#7141)
forki Jul 11, 2019
7d95349
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 11, 2019
ef339d5
wip
cartermp Jul 12, 2019
04c8453
wip
cartermp Jul 12, 2019
72812eb
WIP
cartermp Jul 12, 2019
7043092
Feedback
cartermp Jul 22, 2019
fad8d87
progress
cartermp Jul 22, 2019
c76f6be
simplify defineconstants
cartermp Jul 22, 2019
b79635f
More progress
cartermp Jul 22, 2019
acedd56
no FS_RESHAPED_REFLECTION
cartermp Aug 16, 2019
cc01140
more remove FX_RESHAPED_REFLECTION
cartermp Aug 16, 2019
5b0bb1e
fixing stuff
cartermp Aug 17, 2019
0bf7295
more
cartermp Aug 17, 2019
0417edf
doopty
cartermp Aug 17, 2019
a88058e
Merge branch 'release/fsharp47' into netstandard-fcp
cartermp Aug 17, 2019
7f56757
Update common-variables.yml
cartermp Aug 17, 2019
c54e3fe
Update common-variables.yml
cartermp Aug 17, 2019
5390499
Update illib.fs
cartermp Aug 17, 2019
64fa173
Update illib.fs
cartermp Aug 17, 2019
ad9cd1d
Update prim-types.fs
cartermp Aug 17, 2019
b7d459c
Update quotations.fs
cartermp Aug 17, 2019
b3a8c11
Update reflect.fs
cartermp Aug 17, 2019
8182731
Update seq.fs
cartermp Aug 17, 2019
67e833a
Update sformat.fs
cartermp Aug 17, 2019
fb96871
Update sformat.fs
cartermp Aug 17, 2019
b485292
Update sformat.fsi
cartermp Aug 17, 2019
8b87490
Update sformat.fs
cartermp Aug 17, 2019
9d326fa
Update FSharpReflection.fs
cartermp Aug 17, 2019
db858bf
Update LibraryTestFx.fs
cartermp Aug 17, 2019
fe5a393
Update LibraryTestFx.fs
cartermp Aug 17, 2019
e554f51
Update test.fsx
cartermp Aug 17, 2019
3494619
Update FSharp.Profiles.props
cartermp Aug 17, 2019
cb5eafc
Update FSharp.Compiler.Private.fsproj
cartermp Aug 17, 2019
e3dcfb2
tryit
cartermp Aug 19, 2019
23ec070
nope
cartermp Aug 19, 2019
e7b8380
try it
cartermp Aug 19, 2019
1250697
Print the value for now
cartermp Aug 20, 2019
dfc9c88
Print the value for now
cartermp Aug 20, 2019
5620512
Try emulating build-utils.ps1
cartermp Aug 20, 2019
bed411b
maybe this
cartermp Aug 20, 2019
fce2bfb
Add /bl maybe idk
cartermp Aug 20, 2019
ec6d4ca
get log with no changes to MSBuild shell out
cartermp Aug 20, 2019
5c9118a
derp
cartermp Aug 20, 2019
b96429f
Remove seemingly useless TargetFrameworkS
cartermp Aug 20, 2019
9ae3d66
let's try this
cartermp Aug 20, 2019
52879b2
whatever
cartermp Aug 20, 2019
327e818
lol if this works
cartermp Aug 20, 2019
679eb49
thought so
cartermp Aug 20, 2019
ea5c870
.
cartermp Aug 20, 2019
deee135
.
cartermp Aug 20, 2019
9031d37
tryit
cartermp Aug 20, 2019
7a047a2
revert
cartermp Aug 20, 2019
8446c3e
jojo
cartermp Aug 20, 2019
e1c98b4
jotaru
cartermp Aug 20, 2019
029f479
joseph joestar
cartermp Aug 20, 2019
dfca2e5
closer, based joseph
cartermp Aug 20, 2019
3808796
it's okay joseph, I got you bae
cartermp Aug 20, 2019
83232ab
hahahahahaha
cartermp Aug 20, 2019
df0c689
c'mon jojo
cartermp Aug 20, 2019
aa471cb
Set possibly null value to empty so we get better failures in the reg…
cartermp Aug 20, 2019
2a454da
build log not needed
cartermp Aug 21, 2019
64127c9
Update build.sh
cartermp Aug 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
no FS_RESHAPED_REFLECTION
  • Loading branch information
cartermp committed Aug 17, 2019
commit acedd565128e1c28a1580843a2adab09c896b696
5 changes: 1 addition & 4 deletions FSharp.Profiles.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONFIGURATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WIN_REGISTRY</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WINFORMS</DefineConstants>
<<<<<<< HEAD
<DefineConstants>$(DefineConstants);FX_NO_INDENTED_TEXT_WRITER</DefineConstants>
=======
<DefineConstants>$(DefineConstants);FX_REDUCED_EXCEPTIONS</DefineConstants>
>>>>>>> wip
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFEMIT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_GLOBALIZATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_MSBUILD</DefineConstants>
<OtherFlags>$(OtherFlags) --simpleresolution</OtherFlags>
</PropertyGroup>
Expand Down
4 changes: 3 additions & 1 deletion src/absil/illib.fs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ module Option =
let attempt (f: unit -> 'T) = try Some (f()) with _ -> None

module List =
<<<<<<< HEAD

=======
>>>>>>> no FS_RESHAPED_REFLECTION
let sortWithOrder (c: IComparer<'T>) elements = List.sortWith (Order.toFunction c) elements

let splitAfter n l =
Expand Down Expand Up @@ -1261,7 +1264,6 @@ type LayeredMultiMap<'Key, 'Value when 'Key : equality and 'Key : comparison>(co

[<AutoOpen>]
module Shim =

type IFileSystem =

/// A shim over File.ReadAllBytes
Expand Down
1 change: 1 addition & 0 deletions src/absil/ilwrite.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3035,6 +3035,7 @@ module FileSystemUtilites =
open System
open System.Reflection
open System.Globalization

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whitespace change is staying

let progress = try System.Environment.GetEnvironmentVariable("FSharp_DebugSetFilePermissions") <> null with _ -> false
let setExecutablePermission (filename: string) =

Expand Down
6 changes: 5 additions & 1 deletion src/fsharp/FSharp.Core/prim-types.fs
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,10 @@ namespace Microsoft.FSharp.Core
(# "throw" (e :> System.Exception) : nativeptr<'T> #)

open IntrinsicOperators
<<<<<<< HEAD
=======

>>>>>>> no FS_RESHAPED_REFLECTION
[<CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")>] // nested module OK
module IntrinsicFunctions =

Expand Down Expand Up @@ -4483,7 +4487,7 @@ namespace Microsoft.FSharp.Core
module OperatorIntrinsics =

open System.Collections

let notStarted() = raise (new System.InvalidOperationException(SR.GetString(SR.enumerationNotStarted)))
let alreadyFinished() = raise (new System.InvalidOperationException(SR.GetString(SR.enumerationAlreadyFinished)))

Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/FSharp.Core/quotations.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ module Patterns =
let argtyps : Type list = argTypes |> inst tyargs
let retType : Type = retType |> inst tyargs |> removeVoid
typ.GetProperty(propName, staticOrInstanceBindingFlags, null, retType, Array.ofList argtyps, null) |> checkNonNullResult ("propName", String.Format(SR.GetString(SR.QfailedToBindProperty), propName)) // fxcop may not see "propName" as an arg

let bindField (tc, fldName, tyargs) =
let typ = mkNamedType (tc, tyargs)
typ.GetField(fldName, staticOrInstanceBindingFlags) |> checkNonNullResult ("fldName", String.Format(SR.GetString(SR.QfailedToBindField), fldName)) // fxcop may not see "fldName" as an arg
Expand Down
2 changes: 0 additions & 2 deletions src/fsharp/FSharp.Core/reflect.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module internal ReflectionUtils =

[<AutoOpen>]
module internal Impl =

let getBindingFlags allowAccess = ReflectionUtils.toBindingFlags (defaultArg allowAccess false)

let inline checkNonNull argName (v: 'T) =
Expand Down Expand Up @@ -62,7 +61,6 @@ module internal Impl =
match getInstancePropertyInfo(typ, propName, bindingFlags) with
| null -> None
| prop -> Some(fun (obj: obj) -> prop.GetValue (obj, instancePropertyFlags ||| bindingFlags, null, null, null))

//-----------------------------------------------------------------
// ATTRIBUTE DECOMPILATION

Expand Down
1 change: 0 additions & 1 deletion src/fsharp/FSharp.Core/seq.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,6 @@ namespace Microsoft.FSharp.Collections
[<CompiledName("CountBy")>]
let countBy (projection:'T->'Key) (source:seq<'T>) =
checkNonNull "source" source

if typeof<'Key>.IsValueType
then mkDelayedSeq (fun () -> countByValueType projection source)
else mkDelayedSeq (fun () -> countByRefType projection source)
Expand Down
12 changes: 4 additions & 8 deletions src/utils/sformat.fs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl

// Analyze an object to see if it the representation
// of an F# value.
let GetValueInfoOfObject (bindingFlags:BindingFlags) (obj : obj) =
let GetValueInfoOfObject (bindingFlags:BindingFlags) (obj : obj) =
match obj with
| null -> ObjectValue(obj)
| _ ->
Expand Down Expand Up @@ -454,7 +454,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl
let string_of_int (i:int) = i.ToString()

let typeUsesSystemObjectToString (ty:System.Type) =
try
try
let methInfo = ty.GetMethod("ToString",BindingFlags.Public ||| BindingFlags.Instance,null,[| |],null)
methInfo.DeclaringType = typeof<System.Object>
with e -> false
Expand Down Expand Up @@ -1127,7 +1127,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl
let basicL = LayoutOps.objL obj // This buries an obj in the layout, rendered at squash time via a leafFormatter.
// If the leafFormatter was directly here, then layout leaves could store strings.
match obj with
| _ when opts.ShowProperties ->
| _ when opts.ShowProperties ->
let props = ty.GetProperties(BindingFlags.GetField ||| BindingFlags.Instance ||| BindingFlags.Public)
let fields = ty.GetFields(BindingFlags.Instance ||| BindingFlags.Public) |> Array.map (fun i -> i :> MemberInfo)
let propsAndFields =
Expand All @@ -1143,11 +1143,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl

// massively reign in deep printing of properties
let nDepth = depthLim/10
#if NETSTANDARD
Array.Sort((propsAndFields),{ new IComparer<MemberInfo> with member this.Compare(p1,p2) = compare (p1.Name) (p2.Name) } )
#else
Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } )
#endif
Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } );

if propsAndFields.Length = 0 || (nDepth <= 0) then basicL
else basicL ---
Expand Down
1 change: 0 additions & 1 deletion src/utils/sformat.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl
val output_any: writer:TextWriter -> value:'T * Type -> unit

#if FSHARP_CORE // FSharp.Core.dll: Most functions aren't needed in FSharp.Core.dll, but we add one entry for printf

val anyToStringForPrintf: options:FormatOptions -> bindingFlags:System.Reflection.BindingFlags -> value:'T * Type -> string
#else
val asTaggedTextWriter: writer: TextWriter -> TaggedTextWriter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ type FSharpTypeTests() =

// Regression for 5588, Reflection: unit is still treated as a record type, but only if you pass BindingFlags.NonPublic
[<Test>]
member __.``IsRecord.Regression5588``() =
member __.``IsRecord.Regression5588``() =
// negative
Assert.IsFalse(FSharpType.IsRecord(typeof<unit>))
Assert.IsFalse( FSharpType.IsRecord(typeof<unit>, System.Reflection.BindingFlags.NonPublic) )
Expand Down
2 changes: 1 addition & 1 deletion tests/FSharp.Core.UnitTests/LibraryTestFx.fs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module SurfaceArea =
// get current FSharp.Core
let asm =
typeof<int list>.Assembly

// public types only
let types =
asm.GetExportedTypes()
Expand Down
12 changes: 12 additions & 0 deletions tests/fsharp/core/quotes/test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -2309,16 +2309,28 @@ module ReflectedDefinitionOnTypesWithImplicitCodeGen =

// This type has an implicit IComparable implementation, it is not accessible as a reflected definition
type U = A of int | B of string | C of System.DateTime
<<<<<<< HEAD
=======

>>>>>>> no FS_RESHAPED_REFLECTION
for m in typeof<U>.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do
check "celnwer33" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true

// This type has some implicit codegen
exception X of string * int
<<<<<<< HEAD
=======

>>>>>>> no FS_RESHAPED_REFLECTION
for m in typeof<X>.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do
check "celnwer34" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true

// This type has an implicit IComparable implementation, it is not accessible as a reflected definition
[<Struct>] type SR = { x:int; y:string; z:System.DateTime }
<<<<<<< HEAD
=======

>>>>>>> no FS_RESHAPED_REFLECTION
for m in typeof<SR>.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do
check "celnwer35" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true

Expand Down
3 changes: 3 additions & 0 deletions tests/fsharp/core/subtype/test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,10 @@ module InliningOnSubTypes1 =
(x1, x2)
do check "clkewlijwlkw" (f()) (13, 17)

<<<<<<< HEAD

=======
>>>>>>> no FS_RESHAPED_REFLECTION
module StructUnionSingleCase =
[<Struct>]
type S = S
Expand Down