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

Replace .fsproj with .fableproj in fable_modules #2557

Merged
merged 1 commit into from
Oct 1, 2021
Merged

Conversation

alfonsogarciacaro
Copy link
Member

This is to avoid conflicts with other F# tooling that scans the workspace for .fsproj files (Paket, Ionide), see fable-compiler/fable-react-native#64 (comment)

@ncave
Copy link
Collaborator

ncave commented Sep 30, 2021

@alfonsogarciacaro Is this really needed, it's a little bit odd. Why does the fable_modules folder need to be ignored?

@alfonsogarciacaro
Copy link
Member Author

Yes, it's true it looks a bit like a hack, but it avoids the need of having to patch any other F# tooling that scans for .fsproj files (see link on comment of top). Don't remember what Paket is doing but I remember Ionide used to drive crazy when it found all the .fsproj files.

In principle, this should be completely transparent for the user because the folder is .gitignored and the files are managed automatically by Fable. We could just delete the .fsproj and keep the list of sources from the packages somewhere, although it requires a bit more changes.

@alfonsogarciacaro
Copy link
Member Author

Let's try like this for now and we can fix it more properly later. I've added issue #2558 for that.

@alfonsogarciacaro alfonsogarciacaro merged commit f18ce47 into main Oct 1, 2021
@ncave
Copy link
Collaborator

ncave commented Oct 1, 2021

@alfonsogarciacaro Why can't package sources be referenced from the package folder directly? That's what fable-compiler-js does.

@alfonsogarciacaro
Copy link
Member Author

Because then they're outside the workspace and if one of the .fs sources from a packages references an npm package (say "react" in Fable.React) JS building tools won't be able to locate the npm package. And we cannot just put the compiled .js files in fable_modules, because some packages also contains their own js/css files so we need to keep the original .fs and the compiled .fs.js next to each other (related).

Maybe... we could just copy everything from the package that's not an .fs(proj) and then put the compiled .js files there too. This would require some more changes but could be done along the work to split compilation for package and "user" sources, see #2527

@ncave
Copy link
Collaborator

ncave commented Oct 1, 2021

@alfonsogarciacaro Ok, thanks for the explanation.

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.

2 participants