Use boost::format from the boost package
Note that this only requires headers from boost so it doesn't add a runtime dependency. Also, use Nixpkgs 18.03.
This commit is contained in:
		
							parent
							
								
									56f2ed0081
								
							
						
					
					
						commit
						ca14b14200
					
				
					 23 changed files with 13 additions and 2445 deletions
				
			
		| 
						 | 
				
			
			@ -156,7 +156,7 @@ public:
 | 
			
		|||
        abort();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void trace(const format & f);
 | 
			
		||||
    void trace(const FormatOrString & fs);
 | 
			
		||||
 | 
			
		||||
    string getName()
 | 
			
		||||
    {
 | 
			
		||||
| 
						 | 
				
			
			@ -417,9 +417,9 @@ void Goal::amDone(ExitCode result)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void Goal::trace(const format & f)
 | 
			
		||||
void Goal::trace(const FormatOrString & fs)
 | 
			
		||||
{
 | 
			
		||||
    debug(format("%1%: %2%") % name % f);
 | 
			
		||||
    debug("%1%: %2%", name, fs.s);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,7 @@
 | 
			
		|||
 | 
			
		||||
namespace nix {
 | 
			
		||||
 | 
			
		||||
[[noreturn]] void throwSQLiteError(sqlite3 * db, const format & f)
 | 
			
		||||
[[noreturn]] void throwSQLiteError(sqlite3 * db, const FormatOrString & fs)
 | 
			
		||||
{
 | 
			
		||||
    int err = sqlite3_errcode(db);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -21,7 +21,7 @@ namespace nix {
 | 
			
		|||
            : fmt("SQLite database '%s' is busy", path));
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
        throw SQLiteError("%s: %s (in '%s')", f.str(), sqlite3_errstr(err), path);
 | 
			
		||||
        throw SQLiteError("%s: %s (in '%s')", fs.s, sqlite3_errstr(err), path);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
SQLite::SQLite(const Path & path)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -93,7 +93,7 @@ struct SQLiteTxn
 | 
			
		|||
MakeError(SQLiteError, Error);
 | 
			
		||||
MakeError(SQLiteBusy, SQLiteError);
 | 
			
		||||
 | 
			
		||||
[[noreturn]] void throwSQLiteError(sqlite3 * db, const format & f);
 | 
			
		||||
[[noreturn]] void throwSQLiteError(sqlite3 * db, const FormatOrString & fs);
 | 
			
		||||
 | 
			
		||||
void handleSQLiteBusy(const SQLiteBusy & e);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue