rj-atw commented on a change in pull request #7767:
URL: https://github.com/apache/arrow/pull/7767#discussion_r455492644
##########
File path: rust/datafusion/src/bin/repl.rs
##########
@@ -17,15 +17,29 @@
#![allow(bare_trait_objects)]
+#[cfg(not(target_arch="wasm32"))]
use arrow::util::pretty;
+#[cfg(not(target_arch="wasm32"))]
use clap::{crate_version, App, Arg};
+#[cfg(not(target_arch="wasm32"))]
use datafusion::error::Result;
+#[cfg(not(target_arch="wasm32"))]
use datafusion::execution::context::ExecutionContext;
+#[cfg(not(target_arch="wasm32"))]
use rustyline::Editor;
+#[cfg(not(target_arch="wasm32"))]
use std::env;
+#[cfg(not(target_arch="wasm32"))]
use std::path::Path;
+#[cfg(not(target_arch="wasm32"))]
use std::time::Instant;
+
+#[cfg(target_arch="wasm32")]
+pub fn main() {
+}
Review comment:
WASM is a library only. I believe this code is only useful when creating
an executable.
I know this is a bad hack, but I am actually not really sure why this file
was still pickup by rustc as I should be excluding in the package dependencies.
I'll take another look at why this is still being compile. However, I am
open to suggestion/discussion on alternatives.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]