{"action":"created","comment":{"url":"https://api.github.com/repos/CraneStation/wasmtime/pulls/comments/344512849","pull_request_review_id":314638798,"id":344512849,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0NDUxMjg0OQ==","diff_hunk":"@@ -0,0 +1,53 @@\n+use super::super::filetime::FileTime;\n+use std::fs::File;\n+use std::io;\n+use std::sync::atomic::{AtomicBool, Ordering::SeqCst};\n+\n+pub(crate) const UTIME_NOW: i64 = libc::UTIME_NOW;\n+pub(crate) const UTIME_OMIT: i64 = libc::UTIME_OMIT;\n+\n+pub(crate) fn utimensat(\n+    dirfd: &File,\n+    path: &str,\n+    atime: FileTime,\n+    mtime: FileTime,\n+    symlink: bool,\n+) -> io::Result<()> {\n+    use super::super::filetime::{to_timespec, utimesat};\n+    use std::ffi::CString;\n+    use std::os::unix::prelude::*;\n+\n+    let flags = if symlink {\n+        libc::AT_SYMLINK_NOFOLLOW","path":"crates/wasi-common/src/sys/unix/linux/filetime.rs","position":21,"original_position":21,"commit_id":"8604caabc84754cb9477da796dce4c9495c4920b","original_commit_id":"8604caabc84754cb9477da796dce4c9495c4920b","user":{"login":"sunfishcode","id":4503403,"node_id":"MDQ6VXNlcjQ1MDM0MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/4503403?v=4","gravatar_id":"","url":"https://api.github.com/users/sunfishcode","html_url":"https://github.com/sunfishcode","followers_url":"https://api.github.com/users/sunfishcode/followers","following_url":"https://api.github.com/users/sunfishcode/following{/other_user}","gists_url":"https://api.github.com/users/sunfishcode/gists{/gist_id}","starred_url":"https://api.github.com/users/sunfishcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunfishcode/subscriptions","organizations_url":"https://api.github.com/users/sunfishcode/orgs","repos_url":"https://api.github.com/users/sunfishcode/repos","events_url":"https://api.github.com/users/sunfishcode/events{/privacy}","received_events_url":"https://api.github.com/users/sunfishcode/received_events","type":"User","site_admin":false},"body":"Is the sense here reversed? It looks like `symlink` here means *do* follow, but the flag says *no* follow.","created_at":"2019-11-10T20:21:48Z","updated_at":"2019-11-10T20:51:01Z","html_url":"https://github.com/CraneStation/wasmtime/pull/535#discussion_r344512849","pull_request_url":"https://api.github.com/repos/CraneStation/wasmtime/pulls/535","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/CraneStation/wasmtime/pulls/comments/344512849"},"html":{"href":"https://github.com/CraneStation/wasmtime/pull/535#discussion_r344512849"},"pull_request":{"href":"https://api.github.com/repos/CraneStation/wasmtime/pulls/535"}}},"pull_request":{"url":"https://api.github.com/repos/CraneStation/wasmtime/pulls/535","id":339168020,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM5MTY4MDIw","html_url":"https://github.com/CraneStation/wasmtime/pull/535","diff_url":"https://github.com/CraneStation/wasmtime/pull/535.diff","patch_url":"https://github.com/CraneStation/wasmtime/pull/535.patch","issue_url":"https://api.github.com/repos/CraneStation/wasmtime/issues/535","number":535,"state":"open","locked":false,"title":"Dynamically load utimensat if exists on the host","user":{"login":"kubkon","id":1519747,"node_id":"MDQ6VXNlcjE1MTk3NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1519747?v=4","gravatar_id":"","url":"https://api.github.com/users/kubkon","html_url":"https://github.com/kubkon","followers_url":"https://api.github.com/users/kubkon/followers","following_url":"https://api.github.com/users/kubkon/following{/other_user}","gists_url":"https://api.github.com/users/kubkon/gists{/gist_id}","starred_url":"https://api.github.com/users/kubkon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubkon/subscriptions","organizations_url":"https://api.github.com/users/kubkon/orgs","repos_url":"https://api.github.com/users/kubkon/repos","events_url":"https://api.github.com/users/kubkon/events{/privacy}","received_events_url":"https://api.github.com/users/kubkon/received_events","type":"User","site_admin":false},"body":"This commit introduces a change to file time management for *nix based\r\nhosts in that it firstly tries to load `utimensat` symbol, and if it\r\ndoesn't exist, then falls back to `utimes` instead. This change is\r\nborrowing very heavily from [filetime] crate, however, it introduces a\r\ncouple of helpers and methods specific to WASI use case (or more\r\ngenerally, to a use case which requires modifying times of entities\r\nspecified by a pair `(DirFD, RelativePath)` rather than the typical\r\nfile time specification based only absolute path or raw file descriptor\r\nas is the case with [filetime] crate. The trick here is, that on kernels\r\nwhich do not have `utimensat` symbol, this implementation emulates this\r\nbehaviour by a combination of `openat` and `utimes`.\r\n\r\nThis commit also is meant to address #516.\r\n\r\n[filetime]: https://github.com/alexcrichton/filetime","created_at":"2019-11-10T16:46:13Z","updated_at":"2019-11-10T20:51:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a310f28c3f0acdad1dbd6b09fed9367920d7f11d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CraneStation/wasmtime/pulls/535/commits","review_comments_url":"https://api.github.com/repos/CraneStation/wasmtime/pulls/535/comments","review_comment_url":"https://api.github.com/repos/CraneStation/wasmtime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CraneStation/wasmtime/issues/535/comments","statuses_url":"https://api.github.com/repos/CraneStation/wasmtime/statuses/8604caabc84754cb9477da796dce4c9495c4920b","head":{"label":"kubkon:nixos_utimensat","ref":"nixos_utimensat","sha":"8604caabc84754cb9477da796dce4c9495c4920b","user":{"login":"kubkon","id":1519747,"node_id":"MDQ6VXNlcjE1MTk3NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1519747?v=4","gravatar_id":"","url":"https://api.github.com/users/kubkon","html_url":"https://github.com/kubkon","followers_url":"https://api.github.com/users/kubkon/followers","following_url":"https://api.github.com/users/kubkon/following{/other_user}","gists_url":"https://api.github.com/users/kubkon/gists{/gist_id}","starred_url":"https://api.github.com/users/kubkon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubkon/subscriptions","organizations_url":"https://api.github.com/users/kubkon/orgs","repos_url":"https://api.github.com/users/kubkon/repos","events_url":"https://api.github.com/users/kubkon/events{/privacy}","received_events_url":"https://api.github.com/users/kubkon/received_events","type":"User","site_admin":false},"repo":{"id":220514995,"node_id":"MDEwOlJlcG9zaXRvcnkyMjA1MTQ5OTU=","name":"wasmtime","full_name":"kubkon/wasmtime","private":false,"owner":{"login":"kubkon","id":1519747,"node_id":"MDQ6VXNlcjE1MTk3NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1519747?v=4","gravatar_id":"","url":"https://api.github.com/users/kubkon","html_url":"https://github.com/kubkon","followers_url":"https://api.github.com/users/kubkon/followers","following_url":"https://api.github.com/users/kubkon/following{/other_user}","gists_url":"https://api.github.com/users/kubkon/gists{/gist_id}","starred_url":"https://api.github.com/users/kubkon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubkon/subscriptions","organizations_url":"https://api.github.com/users/kubkon/orgs","repos_url":"https://api.github.com/users/kubkon/repos","events_url":"https://api.github.com/users/kubkon/events{/privacy}","received_events_url":"https://api.github.com/users/kubkon/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kubkon/wasmtime","description":"Standalone JIT-style runtime for WebAssembly, using Cranelift","fork":true,"url":"https://api.github.com/repos/kubkon/wasmtime","forks_url":"https://api.github.com/repos/kubkon/wasmtime/forks","keys_url":"https://api.github.com/repos/kubkon/wasmtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubkon/wasmtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubkon/wasmtime/teams","hooks_url":"https://api.github.com/repos/kubkon/wasmtime/hooks","issue_events_url":"https://api.github.com/repos/kubkon/wasmtime/issues/events{/number}","events_url":"https://api.github.com/repos/kubkon/wasmtime/events","assignees_url":"https://api.github.com/repos/kubkon/wasmtime/assignees{/user}","branches_url":"https://api.github.com/repos/kubkon/wasmtime/branches{/branch}","tags_url":"https://api.github.com/repos/kubkon/wasmtime/tags","blobs_url":"https://api.github.com/repos/kubkon/wasmtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubkon/wasmtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubkon/wasmtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubkon/wasmtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubkon/wasmtime/statuses/{sha}","languages_url":"https://api.github.com/repos/kubkon/wasmtime/languages","stargazers_url":"https://api.github.com/repos/kubkon/wasmtime/stargazers","contributors_url":"https://api.github.com/repos/kubkon/wasmtime/contributors","subscribers_url":"https://api.github.com/repos/kubkon/wasmtime/subscribers","subscription_url":"https://api.github.com/repos/kubkon/wasmtime/subscription","commits_url":"https://api.github.com/repos/kubkon/wasmtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubkon/wasmtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubkon/wasmtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubkon/wasmtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubkon/wasmtime/contents/{+path}","compare_url":"https://api.github.com/repos/kubkon/wasmtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubkon/wasmtime/merges","archive_url":"https://api.github.com/repos/kubkon/wasmtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubkon/wasmtime/downloads","issues_url":"https://api.github.com/repos/kubkon/wasmtime/issues{/number}","pulls_url":"https://api.github.com/repos/kubkon/wasmtime/pulls{/number}","milestones_url":"https://api.github.com/repos/kubkon/wasmtime/milestones{/number}","notifications_url":"https://api.github.com/repos/kubkon/wasmtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubkon/wasmtime/labels{/name}","releases_url":"https://api.github.com/repos/kubkon/wasmtime/releases{/id}","deployments_url":"https://api.github.com/repos/kubkon/wasmtime/deployments","created_at":"2019-11-08T17:20:12Z","updated_at":"2019-11-08T21:49:51Z","pushed_at":"2019-11-10T17:02:15Z","git_url":"git://github.com/kubkon/wasmtime.git","ssh_url":"git@github.com:kubkon/wasmtime.git","clone_url":"https://github.com/kubkon/wasmtime.git","svn_url":"https://github.com/kubkon/wasmtime","homepage":"https://wasmtime.dev/","size":14284,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CraneStation:master","ref":"master","sha":"ef1cbfdaa88bae0ad9ff967c70cdae7c7b33fd10","user":{"login":"CraneStation","id":11573910,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNTczOTEw","avatar_url":"https://avatars3.githubusercontent.com/u/11573910?v=4","gravatar_id":"","url":"https://api.github.com/users/CraneStation","html_url":"https://github.com/CraneStation","followers_url":"https://api.github.com/users/CraneStation/followers","following_url":"https://api.github.com/users/CraneStation/following{/other_user}","gists_url":"https://api.github.com/users/CraneStation/gists{/gist_id}","starred_url":"https://api.github.com/users/CraneStation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CraneStation/subscriptions","organizations_url":"https://api.github.com/users/CraneStation/orgs","repos_url":"https://api.github.com/users/CraneStation/repos","events_url":"https://api.github.com/users/CraneStation/events{/privacy}","received_events_url":"https://api.github.com/users/CraneStation/received_events","type":"Organization","site_admin":false},"repo":{"id":101767772,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE3Njc3NzI=","name":"wasmtime","full_name":"CraneStation/wasmtime","private":false,"owner":{"login":"CraneStation","id":11573910,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNTczOTEw","avatar_url":"https://avatars3.githubusercontent.com/u/11573910?v=4","gravatar_id":"","url":"https://api.github.com/users/CraneStation","html_url":"https://github.com/CraneStation","followers_url":"https://api.github.com/users/CraneStation/followers","following_url":"https://api.github.com/users/CraneStation/following{/other_user}","gists_url":"https://api.github.com/users/CraneStation/gists{/gist_id}","starred_url":"https://api.github.com/users/CraneStation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CraneStation/subscriptions","organizations_url":"https://api.github.com/users/CraneStation/orgs","repos_url":"https://api.github.com/users/CraneStation/repos","events_url":"https://api.github.com/users/CraneStation/events{/privacy}","received_events_url":"https://api.github.com/users/CraneStation/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/CraneStation/wasmtime","description":"Standalone JIT-style runtime for WebAssembly, using Cranelift","fork":false,"url":"https://api.github.com/repos/CraneStation/wasmtime","forks_url":"https://api.github.com/repos/CraneStation/wasmtime/forks","keys_url":"https://api.github.com/repos/CraneStation/wasmtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CraneStation/wasmtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CraneStation/wasmtime/teams","hooks_url":"https://api.github.com/repos/CraneStation/wasmtime/hooks","issue_events_url":"https://api.github.com/repos/CraneStation/wasmtime/issues/events{/number}","events_url":"https://api.github.com/repos/CraneStation/wasmtime/events","assignees_url":"https://api.github.com/repos/CraneStation/wasmtime/assignees{/user}","branches_url":"https://api.github.com/repos/CraneStation/wasmtime/branches{/branch}","tags_url":"https://api.github.com/repos/CraneStation/wasmtime/tags","blobs_url":"https://api.github.com/repos/CraneStation/wasmtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CraneStation/wasmtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CraneStation/wasmtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/CraneStation/wasmtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CraneStation/wasmtime/statuses/{sha}","languages_url":"https://api.github.com/repos/CraneStation/wasmtime/languages","stargazers_url":"https://api.github.com/repos/CraneStation/wasmtime/stargazers","contributors_url":"https://api.github.com/repos/CraneStation/wasmtime/contributors","subscribers_url":"https://api.github.com/repos/CraneStation/wasmtime/subscribers","subscription_url":"https://api.github.com/repos/CraneStation/wasmtime/subscription","commits_url":"https://api.github.com/repos/CraneStation/wasmtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/CraneStation/wasmtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/CraneStation/wasmtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/CraneStation/wasmtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/CraneStation/wasmtime/contents/{+path}","compare_url":"https://api.github.com/repos/CraneStation/wasmtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CraneStation/wasmtime/merges","archive_url":"https://api.github.com/repos/CraneStation/wasmtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CraneStation/wasmtime/downloads","issues_url":"https://api.github.com/repos/CraneStation/wasmtime/issues{/number}","pulls_url":"https://api.github.com/repos/CraneStation/wasmtime/pulls{/number}","milestones_url":"https://api.github.com/repos/CraneStation/wasmtime/milestones{/number}","notifications_url":"https://api.github.com/repos/CraneStation/wasmtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CraneStation/wasmtime/labels{/name}","releases_url":"https://api.github.com/repos/CraneStation/wasmtime/releases{/id}","deployments_url":"https://api.github.com/repos/CraneStation/wasmtime/deployments","created_at":"2017-08-29T14:01:55Z","updated_at":"2019-11-10T08:17:45Z","pushed_at":"2019-11-10T18:41:21Z","git_url":"git://github.com/CraneStation/wasmtime.git","ssh_url":"git@github.com:CraneStation/wasmtime.git","clone_url":"https://github.com/CraneStation/wasmtime.git","svn_url":"https://github.com/CraneStation/wasmtime","homepage":"https://wasmtime.dev/","size":14372,"stargazers_count":1601,"watchers_count":1601,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":117,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":97,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":117,"open_issues":97,"watchers":1601,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CraneStation/wasmtime/pulls/535"},"html":{"href":"https://github.com/CraneStation/wasmtime/pull/535"},"issue":{"href":"https://api.github.com/repos/CraneStation/wasmtime/issues/535"},"comments":{"href":"https://api.github.com/repos/CraneStation/wasmtime/issues/535/comments"},"review_comments":{"href":"https://api.github.com/repos/CraneStation/wasmtime/pulls/535/comments"},"review_comment":{"href":"https://api.github.com/repos/CraneStation/wasmtime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CraneStation/wasmtime/pulls/535/commits"},"statuses":{"href":"https://api.github.com/repos/CraneStation/wasmtime/statuses/8604caabc84754cb9477da796dce4c9495c4920b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sunfishcode"}}