Skip to content

Conversation

@cloudRoutine
Copy link
Contributor

Field Names for Union Cases improves the clarity of intellisense tooltips and makes pattern matching easier.

Copy link
Contributor

@forki forki left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

Choose a reason for hiding this comment

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

I would not call it ifdef

Copy link
Contributor

Choose a reason for hiding this comment

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

PreprocessorDirective?

Copy link
Contributor

Choose a reason for hiding this comment

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

After looking at this I wonder if we can change the type name to Range with uppercase R

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's the same as FCS this way

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes please align as closely as possible with FCS until we've iterated a round of merges

Copy link
Contributor

Choose a reason for hiding this comment

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

@cloudRoutine Indeed I'd prefer it if it's 100% identical, it will make life hell otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aren't the ast.fs files the same? can't this one replace the one in FCS?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes in theory but we normally rely on Git to mark up conflicts when we do merges

Note we normally merge visualfsharp --> fsharp --> FCS.

Because we already allowed these additions to FCS then we will get conflicts when we merge a conflicting version of these changes into visualfsharp.

Basically every time we change FCS without first submitting to visualfsharp we build up lots of work for ourselves. It's useful from time to time (especially when engineering in this repo was hard and CI incomplete) but we pay a price for it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@cloudRoutine If you can do the integrations visualfsharp --> fsharp --> FCS then that would help, though it's not easy to do those.

You should first integrate all changes besides these ones from VF --> F -> FCS

Then make the precise aligning change to VF which gets the diff smaller

Then integrate again VF --> F --> FCS

Note the VF doesn't contain the commit history from F or FCS (and indeed can't contain those for various legal and technical reasons). So we can't integrate FCS --> VF or F --> VF. But F and FCS do contain the commit history from VF.

@dsyme
Copy link
Contributor

dsyme commented Nov 26, 2016

Ahh ok.....

Before we add more field names to ast.fs, we should first merge the existing set of changes from FSHarp.Compiler.Service that add a whole swathe of field names

@cloudRoutine Could you merge these over please? Or are these changes already the same is those?

@cloudRoutine
Copy link
Contributor Author

@dsyme they're almost the same changes, I stopped using id:Ident for ident:Ident added some additional field names, but they're 95%+ the same. I tried to have better consitency and clarity across the names in this one. My intention was for you to be able to clobber the FCS version with this new improved one.

@dsyme
Copy link
Contributor

dsyme commented Nov 26, 2016

@cloudRoutine We really, really have to merge these repos...

@cloudRoutine cloudRoutine force-pushed the caseNames branch 2 times, most recently from 9d36155 to 32df5f1 Compare November 26, 2016 22:58
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What are these bools for?

Copy link
Contributor

Choose a reason for hiding this comment

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

They indicate (isLastCompiland, isExe) - last file in input, and are we treating the input as if it's defining a .EXE (no warning on missing "module" in last compiland)

Copy link
Contributor

Choose a reason for hiding this comment

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

Messy, see e.g. let isLastCompiland = fst cenv.isLastCompiland and some isExe thing

@dsyme
Copy link
Contributor

dsyme commented Nov 26, 2016

@cloudRoutine I'm too heads down in VS2017 issue to answer these - just trawl through the code to track their use - probably language service stuff in vs...

@cloudRoutine
Copy link
Contributor Author

these are the ones I couldn't find when I went looking for them, I'll try again once the find references service is working properly

@dsyme
Copy link
Contributor

dsyme commented Nov 26, 2016

@cloudRoutine Just do a textual search for the appropriate identifiers

@cloudRoutine
Copy link
Contributor Author

@dsyme I took all the changes that were made in FCS applied them in one commit, then applied the additional names and changes in a second commit.

Should I cherry pick these commits onto fsharp and FCS? or did I not do it right?

@dsyme
Copy link
Contributor

dsyme commented Nov 27, 2016

Should I cherry pick these commits onto fsharp and FCS? or did I not do it right?

Yes, if you make identical changes to fsharp and FCS then things should be oK. That file doesn't change much

@cloudRoutine
Copy link
Contributor Author

@dsyme dsyme merged commit c22aaa2 into dotnet:master Nov 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants