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

[Truffle] Start to support the Rubinius FFI and POSIX calls #2811

Merged
merged 8 commits into from Apr 8, 2015

Conversation

chrisseaton
Copy link
Contributor

This is the start of the work that will enable us to use the Rubinius implementation of File, IO and Socket, which are large areas of missing functionality.

@thomaswue @nirvdrum @eregon

# See also Dir::rmdir.
def self.unlink(*paths)
paths.each do |path|
n = POSIX.unlink Rubinius::Type.coerce_to_path(path)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can call simple POSIX functions fairly directly.

@chrisseaton chrisseaton added this to the truffle-dev milestone Apr 8, 2015
@nirvdrum
Copy link
Contributor

nirvdrum commented Apr 8, 2015

I haven't yet tried to run any of this, but my immediate concern is breaking Windows. While there's an awful lot we don't yet fully support, JRuby+Truffle is substantially usable on Windows today. I think jnr-posix will get us most of the way there and it may turn out we need to fill in some Win32 gaps there, but I wanted to raise the topic now before we get too far. I'll try running the branch in Windows tomorrow to see where we're at.


# Load all the platform dependent types

# MODIFIED
Copy link
Contributor

Choose a reason for hiding this comment

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

If we need to diverge from Rubinius, it'd probably be best to document why.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes sorry I must have been in the middle of a thought here ands stopped mid-comment.

@eregon
Copy link
Member

eregon commented Apr 8, 2015

I commented per commit as this was easier.

@eregon
Copy link
Member

eregon commented Apr 8, 2015

@chrisseaton I'll let you merge, in case you want to add additional commits before the merge.

@chrisseaton
Copy link
Contributor Author

@nirvdrum we're using jnr-posix to make these calls, and there is a Windows and generic Java implementation of most of them. For example unlink simply does File.delete on a JVM without JNI or on Windows. I hope that covers us for all the POSIX calls that make sense. I guess things like lstat aren't implemented for non-POSIX systems, but then what would it do on Windows anyway.

chrisseaton added a commit that referenced this pull request Apr 8, 2015
[Truffle] Start to support the Rubinius FFI and POSIX calls
@chrisseaton chrisseaton merged commit 2e27cfc into master Apr 8, 2015
@enebo enebo added this to the Non-Release milestone Dec 7, 2017
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.

None yet

4 participants