about summary refs log tree commit diff stats
path: root/020run.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-07-05 00:53:12 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-07-05 00:53:12 -0700
commitf28f2636c6707e1a33bebacafd0486f4965978ea (patch)
treeeba4edbcbf6cd4ad1e14b9629613003bf224c3f1 /020run.cc
parent7e85c3362ce7e34165d90695fb86d3e421837fe8 (diff)
downloadmu-f28f2636c6707e1a33bebacafd0486f4965978ea.tar.gz
3101 - purge .traces/ dir from repo history
I'd been toying with this idea for some time now given how large the
repo had been growing. The final straw was noticing that people cloning
the repo were having to wait *5 minutes*! That's not good, particularly
for a project with 'tiny' in its description. After purging .traces/
clone time drops to 7 seconds in my tests.

Major issue: some commits refer to .traces/ but don't really change
anything there. That could get confusing :/

Minor issues:

a) I've linked inside commits on GitHub like a half-dozen times online
or over email. Those links are now liable to eventually break. (I seem
to recall GitHub keeps them around as long as they get used at least
once every 60 days, or something like that.)

b) Numbering of commits is messed up because some commits only had
changes to the .traces/ sub-directory.
Diffstat (limited to '020run.cc')
-rw-r--r--020run.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/020run.cc b/020run.cc
index 228c8e2d..5568b2a4 100644
--- a/020run.cc
+++ b/020run.cc
@@ -134,7 +134,7 @@ inline const vector<instruction>& routine::steps() const {
 //: Step 1: load all .mu files with numeric prefixes (in order)
 :(before "End Load Recipes")
 // Load .mu Core
-//? Trace_file = "interactive";
+//? Save_trace = true;
 //? START_TRACING_UNTIL_END_OF_SCOPE;
 load_file_or_directory("core.mu");
 //? DUMP("");
@@ -168,7 +168,7 @@ save_snapshots();
 if (!Run_tests && contains_key(Recipe_ordinal, "main") && contains_key(Recipe, get(Recipe_ordinal, "main"))) {
   // Running Main
   setup();
-//?   Trace_file = "interactive";
+//?   Save_trace = true;
 //?   START_TRACING_UNTIL_END_OF_SCOPE;
   trace(9990, "run") << "=== Starting to run" << end();
   assert(Num_calls_to_transform_all == 1);
@@ -201,8 +201,8 @@ void dump_profile() {
 
 :(code)
 void cleanup_main() {
-  if (!Trace_file.empty() && Trace_stream) {
-    ofstream fout((Trace_dir+Trace_file).c_str());
+  if (Save_trace && Trace_stream) {
+    ofstream fout("interactive");
     fout << Trace_stream->readable_contents("");
     fout.close();
   }