Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Add support for input from a file or a whole directory of sources; classpath from repo #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

erav
Copy link

@erav erav commented Sep 26, 2015

Hi,
Thanks for your great project!

Since I needed to trans-pile a complete directory of mixed java and scala source code, I extended the input mechanism to support this use-case:
A user may specify a file or a directory as input on the command line when running the tool, and the runtime will take care of loading the required content, and generating the class-path for the content from a maven-like repository.

The output is currently all the trans-piled java sources in a single directory.

I hope we can continue to collaborate in this project in the future.

Thanks,
Eitan

1. single file on file system
2. whole source tree on file system
using a classpath from a jar repo on the file system.
@Aivean
Copy link
Owner

Aivean commented Sep 26, 2015

Hi, thanks for your contribution.

You did a great job and definitely invested a lot of efforts in this pull request. However, I can't merge it at once as is.

Here are the reasons:

  • the project was originally intended as pure scala (however I was forced to add java sources to patch thirdparty library)
  • there are minor differences between your code style and the one that I consider "standart" (I realize that you couldn't have been aware of any style guidelines for this project. Anyway, it's easy to fix)
  • and the most important, your change adds a lot of complexity to the otherwise simple project (see below)

My original intention was to have simple tool that transpiles simple Scala snippets to help Scala learners improve their understanding of Scala internals. Your change makes this tool look like it's ready for industry-level usage, such as transpiling whole projects to java. While in reality, it's not ready. Procyon decompiler used in this tool sometimes produces java code that can't be compiled. It's ok for educational purpose, but definitely not ok for industrial usage.

I'm very grateful for your contribution and I will think how I can adapt your changes or what are other possible options. I'll keep you posted.

@erav
Copy link
Author

erav commented Sep 27, 2015

Hi and thanks for your detailed response.

Actually, my motivation is the same as yours - educational. My use case is that as a new member on a team with a bilingual code base, I needed to quickly jump into industrial grade scala+java code that has many dependencies. Inputing a simple snippet or even the contents of single file into the tool did not trans-pile because of missing code, imports and class-path dependencies . I therefore embarked on this project...

I was hoping that by merging my changes, we could support this use case and collaborate on issues that are still open, as far as I am concerned, such as:

  1. some scala code fails to compile and requires manual intervention.
  2. the structure and readability of the java output.

Thanks,
Eitan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants