Skip to content

Commit 6f86ca4

Browse files
committed
chore: remove debug code
1 parent 0465e36 commit 6f86ca4

File tree

12 files changed

+4
-35
lines changed

12 files changed

+4
-35
lines changed

.github/workflows/test.yml

-8
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ on:
22
push:
33
branches:
44
- master
5-
- v2-ci
65
pull_request:
76
branches:
87
- master
9-
- v2-ci
108

119
name: Test
1210

@@ -139,11 +137,5 @@ jobs:
139137
APPLE_ID: ${{ secrets.APPLE_ID }}
140138
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
141139
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
142-
# TODO remove till args
143140
with:
144-
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
145-
releaseName: 'v__VERSION__'
146-
releaseBody: 'See the assets to download this version and install.'
147-
releaseDraft: true
148-
prerelease: false
149141
args: --target universal-apple-darwin

src-tauri/src/lib/watcher.rs

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ pub async fn watch_task(mission: Weak<Mission>) -> io::Result<()> {
6464
if !item.path.as_os_str().is_empty() {
6565
tauri::async_runtime::spawn_blocking({
6666
let _path = item.path.clone();
67-
// TODO make walk_config Arc
6867
let walk_config = config.walk.clone();
6968
let cache = cache.clone();
7069
let metrics = metrics.clone();

src-tauri/src/main.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ fn get_config(mission: tauri::State<Arc<Mission>>) -> Arc<PreConfig> {
4242
#[tauri::command]
4343
fn set_config(mission: tauri::State<Arc<Mission>>, config: PreConfig) -> Result<(), String> {
4444
let mission = mission.inner().clone();
45-
eprintln!("set_config: {:?}", config);
4645
mission.set_config(config).map_err(|e| e.to_string())
4746
}
4847

@@ -59,16 +58,12 @@ fn start_full_scan(mission: tauri::State<Arc<Mission>>) {
5958
#[tauri::command]
6059
fn stop_full_scan(mission: tauri::State<Arc<Mission>>) {
6160
mission.stop_full_scan();
62-
eprintln!("Scan stopped")
6361
}
6462

6563
#[tauri::command]
6664
async fn apply_action_batch(batch: ExclusionActionBatch) -> Result<(), ApplyErrors> {
67-
eprintln!("apply_action_batch: {:?}", batch);
6865
tauri::async_runtime::spawn_blocking(move || {
69-
let r = batch.apply().tap_err(|e| {
70-
eprintln!("Error when applying batch: {:?}", e);
71-
});
66+
let r = batch.apply().tap_err(|e| {});
7267
ApplyErrors::from(r)
7368
})
7469
.await
@@ -127,7 +122,6 @@ fn main() {
127122
build_meta
128123
])
129124
.setup(move |app| {
130-
// TODO circular dependency?
131125
app.manage(
132126
Mission::new_arc(app.handle(), config_manager).expect("failed to create mission"),
133127
);

src-tauri/src/plugins.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub mod auto_launch {
9696
fn is_enabled(&self) -> bool {
9797
let service: id = unsafe { msg_send![class!(SMAppService), mainAppService] };
9898
let status: NSInteger = unsafe { msg_send![service, status] };
99-
dbg!(status) == SMAppServiceStatusEnabled
99+
status == SMAppServiceStatusEnabled
100100
}
101101
}
102102

src/components/RuleItem.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export const RuleItem = React.memo(({
1717
allPaths,
1818
ruleNames
1919
}: RuleItemProps) => {
20-
console.log("rule item rerender", name);
2120
const setRules = useSetRecoilState(rulesState);
2221
const setValue = useSetRecoilState(perRuleState(name));
2322
const [renaming, setRenaming] = useState(false);

src/components/SelectionTable.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ type SelectionRowProps = {
8080
}
8181

8282
const SelectionRow = React.memo(({selected, item, onToggle}: SelectionRowProps) => {
83-
console.log("SelectionRow", item);
8483
const {classes, cx} = useTableStyles();
8584

8685
return (

src/equalSelector.ts

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export function equalSelector<T>(options: EqualSelectorOptions<T>): RecoilState<
3131
if (prior != null && options.equals(latest, prior)) {
3232
return prior;
3333
}
34-
console.log("equalSelector rerender", options.key, latest, prior);
3534
prior = latest;
3635
return latest as T;
3736
}, ...options.set ? {set: options.set} : {}

src/pages/main/Directories.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ const WatchedDirItem = React.memo(({
6363
siblingSelector: "tr",
6464
orientation: "vertical",
6565
onKeyDown: (e) => {
66-
console.log("tr", e.key);
6766
if (e.key === "Enter" || e.key == " ") {
6867
setPopOverOpened(true);
6968
}
@@ -187,7 +186,6 @@ const SkippedDirs = () => {
187186
siblingSelector: "tr",
188187
orientation: "vertical",
189188
onKeyDown: (e) => {
190-
console.log("tr", e.key);
191189
if (e.key === "Enter" || e.key == " ") {
192190
setSelected(idx);
193191
}

src/pages/main/General.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ export const General = () => {
1010
<Stack py={"xl"}>
1111
<Checkbox size={"sm"} label={<Text size={"md"}>Start at Login</Text>}
1212
checked={autoStart} onChange={(ev) => {
13-
console.log("autoStart", ev.target.checked);
1413
setAutoStart(ev.currentTarget.checked);
1514
}}/>
1615
<Box/>
1716
<Checkbox
1817
checked={noInclude}
1918
size={"sm"}
2019
onChange={() => {
21-
console.log("change");
2220
setNoInclude(!noInclude);
2321
}}
2422
label={<>

src/pages/main/Rules.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export const Rules = () => {
6363
const ruleNames = useRecoilValue(ruleNamesState);
6464
const rules = useRecoilValue(rulesState);
6565
const allPaths = useRecoilValue(allPathsState);
66-
console.log("rules rerender", ruleNames);
6766
return (<Container sx={{height: "100%"}}>
6867
<Stack py={"xl"} sx={{height: "100%"}}>
6968
<Group sx={{flexWrap: "nowrap"}}>

src/pages/main/scan/Overview.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ export const Overview = React.forwardRef(() => {
2929

3030
const apply = async () => {
3131
setScanPage("applying");
32-
console.log({
33-
add: addSelection,
34-
remove: removeSelection,
35-
});
3632
try {
3733
await applyActionBatch({
3834
add: addSelection,

src/states.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export const perRuleState = equalSelectorFamily({
8989
return rules[ruleName];
9090
},
9191
set: (ruleName: string) => ({set}, newValue) => {
92-
console.log("set", ruleName, newValue);
9392
set(rulesState, (prev) => ((!(newValue instanceof DefaultValue) && prev !== null) ? {
9493
...prev,
9594
[ruleName]: newValue
@@ -263,7 +262,6 @@ export const SyncActionBatch = () => {
263262
const set = useSetRecoilState(selectedActionBatchState);
264263
const initial = useRecoilValue(actionBatchState);
265264
useEffect(() => {
266-
console.log("SyncActionBatch", initial);
267265
if (initial !== null) {
268266
set({
269267
add: [...initial.add],
@@ -288,13 +286,11 @@ export const applyErrorsState = atom<ApplyErrors | null>({
288286

289287
const autoStartEffect: AtomEffect<boolean> = ({onSet, setSelf}) => {
290288
onSet((newValue) => {
291-
console.log("autoStartEffect", newValue);
292289
const f = async () => {
293-
console.log("autoStartEffect(inner)", newValue);
294290
if (newValue) {
295-
console.log(await enableAutoStart());
291+
await enableAutoStart();
296292
} else {
297-
console.log(await disableAutoStart());
293+
await disableAutoStart();
298294
}
299295
setSelf(await getAutoStart());
300296
};

0 commit comments

Comments
 (0)