Skip to content

all examples can build now#18

Merged
Anton-4 merged 1 commit intomainfrom
build-fixes
Jan 20, 2023
Merged

all examples can build now#18
Anton-4 merged 1 commit intomainfrom
build-fixes

Conversation

@Anton-4
Copy link
Collaborator

@Anton-4 Anton-4 commented Jan 17, 2023

No description provided.

use glue::Metadata;
use roc_std::{RocDict, RocList, RocResult, RocStr};
use std::borrow::{Borrow, Cow};
use std::ffi::{CStr, OsStr};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unused

use std::ffi::{OsStr};
use std::fs::File;
use std::io::Write;
use std::os::raw::c_char;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unused

Comment on lines -108 to -113
#[cfg(unix)]
#[no_mangle]
pub unsafe extern "C" fn roc_send_signal(pid: libc::pid_t, sig: libc::c_int) -> libc::c_int {
libc::kill(pid, sig)
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was also removed in the cli platform on the repo

platform "cli"
requires {} { main : Task {} [] }
exposes [Task, Process, Stdout, Stderr, Stdin, Path, File, FileMetadata, Dir, Arg, Env, EnvDecoding, Url, Http]
exposes []
Copy link
Collaborator Author

@Anton-4 Anton-4 Jan 17, 2023

Choose a reason for hiding this comment

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

@rtfeldman this fixes building env.roc and file.roc, but it may cause no docs to be generated? Also strangely, even though nothing is exposed, Task, Stdout, Stderr... can still be used by for example env.roc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This also prevents the false positive import error from occurring that I talked to you about earlier:

── MODULE NOT IMPORTED ──── ../../basic-cli2/basic-cli/examples/../src/Env.roc ─

The `EnvDecoding` module is not imported:

78│                          Decode.fromBytes (Str.toUtf8 varStr) (EnvDecoding.format {})
                                                                   ^^^^^^^^^^^^^^^^^^

Did you mean to import it?

────────────────────────────────────────────────────────────────────────────────

Which was caused by commit e549456

@Anton-4 Anton-4 merged commit 50c6073 into main Jan 20, 2023
@Anton-4 Anton-4 deleted the build-fixes branch January 20, 2023 16:43
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.

1 participant