-
Notifications
You must be signed in to change notification settings - Fork 17
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
Library Approach #10
Comments
I think we should start with the following:
Anyway: I think we should start with the brute force to have some proof of concept. I just merged @tlycken's build infrastructure PR, so please go ahead and try to do something to get us started. And btw: welcome aboard! |
Just poking my nose in... |
Good point.
Am 03.01.2018 23:09 schrieb "Anthony Lloyd" <[email protected]>:
Just poking my nose in...
I think for 2) you could just try one file first until it compiles then add
second etc. Its O(n^2) vs O(n!)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNBImktUY_pCzVFiDukk_o8QIhTWNks5tG_qEgaJpZM4RRIRB>
.
|
I volunteer in graph knowledge area :) If we have all symbols declared and used in all files, then we can create directed graph where A -> B means that file B uses symbol that is declared in file A. Then ordering is question of finding topological sort of graph, which is O(n^2) https://en.wikipedia.org/wiki/Topological_sorting. This alg return valid order or subset of files where is dependency cycle. I think it can be easily altered to respect previous order as much as possible. I would happily try to implement this. I did some experimenting with getting symbols from FCS with |
Cool.
Tbh I have no idea if it will turn out to be the correct way. But it sounds
promising
Am 04.01.2018 08:22 schrieb "jindraivanek" <[email protected]>:
… I volunteer in graph knowledge area :)
If we have all symbols declared and used in all files, then we can create
directed graph where A -> B means that file B uses symbol that is declared
in file A. Then ordering is question of finding topological sort of graph,
which is O(n^2) https://en.wikipedia.org/wiki/Topological_sorting. This
alg return valid order or subset of files where is dependency cycle. I
think it can be easily altered to respect previous order as much as
possible.
I would happily try to implement this. I did some experimenting with
getting symbols from FCS with GetAllUsesOfAllSymbolsInFile yesterday,
with some success (https://github.com/jindraivanek/
AProjectHasNoName/blob/symbol-graph/src/FSharp.Project.
FileOrderer/Library.fs), but not sure if that is correct way.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNNvE-3wob0g4ofc1kOLOP7IPqhSeks5tHHwfgaJpZM4RRIRB>
.
|
I would like to suggest that we (well, I'm not directly involved, so perhaps "you" is more accurate...) strongly consider ensuring that the algorithm is completely decoupled from the features of FCS and such. There (as far as I can see) should be nothing to stop an algorithm etc. being designed and implemented with no dependency on FCS or anything like that. FCS -> Mechanic domain model (types like The internals can then be tested out to our hearts content without needing a "real" project etc. to do this. |
Yes, @isaacabraham's point is crucial to success here. That also has the additional upside that someone with no knowledge at all can work on the ordering algorithm, while someone with no knowledge of how to write the ordering algorithm can write the FCS integrations. If we decide to build on top of Forge (see #36, ionide/Forge#104), we probably need two algorithms, with some integrations at either end:
In principle, the actual implementation of these steps can be built independently, as long as we agree on the domain language. |
Hey guys, I'm definitely keen to jump in. This is my first foray into OSS, so apologies for any faux pas. I had a look at the project setup that @tlycken put together, and have been giving some thought to the algorithms and task list @forki laid out. I've also been playing around with FSC and reading through the docs, but its new to me (eager to learn though!). I guess my question is, what is the best approach to start? A few thoughts:
Utils.fs
file in thePaket
project to walk the source code directory and build data structures for each project and its contents. This might be a good module to start on?FSharpCheckProjectResults
with an emptyErrors
array would indicate a correctly ordered project and thus no action. Easy enough ;)Naturally determining an incorrectly ordered project and finding a correct order will be a bit more involved. I'll continue to explore the FSC APIs and try to devise an approach while working on a files module. Perhaps we could also post thoughts in this thread as they come together that will hopefully serve to flesh out the requirements more broadly?
If this all sounds reasonable I'll crack on, but please do let me know if I'm off base.
The text was updated successfully, but these errors were encountered: